From ab280600d624d362d1182087fd9af54df3194fe1 Mon Sep 17 00:00:00 2001 From: Parham Alvani Date: Fri, 6 Sep 2024 06:27:07 +0000 Subject: [PATCH] Update README.md --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 264ec1c..577933d 100644 --- a/README.md +++ b/README.md @@ -1 +1,14 @@

In-memory central messaging queue for dummies

+ +## Introduction + +Sometimes you want to test your code with mocks and here is a mock for messaging queue. It tries to mimic the NATS concepts +and for sure it cannot. It doesn't have any dependencies except Go standard libraries and you can easily use it in your tests. + +```go +mmq := cmq.NewMockMessageQueue[int]() + +# register two different subscribing groups. +mmq.Register("s1", "numbers", 10) +mmq.Register("s2", "numbers", 10) +```