-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4042ee6
commit ab28060
Showing
1 changed file
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
<h1 align="center">In-memory central messaging queue for dummies</h1> | ||
|
||
## 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) | ||
``` |