Skip to content

1995parham-learning/cmq-1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Central Messaging Queue Minus One

In-memory central messaging queue for dummies

GitHub Actions Workflow Status GitHub repo size GitHub go.mod Go version (subdirectory of monorepo) Codecov

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.

mmq := cmq.NewMockMessageQueue[int]()

// register two different subscribing groups.
// create a subscribe groip on "numbers" topic which is named "s1"
mmq.Register("s1", "numbers", 10)
// create a subscribe groip on "numbers" topic which is named "s2"
mmq.Register("s2", "numbers", 10)

About

In-memory central messaging queue for dummies

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages