Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.07 KB

README.md

File metadata and controls

24 lines (16 loc) · 1.07 KB

roger

Inspired by psychologist Carl Rogers who coined the term Active Listening. Listening is good, and this library listens.

Also: "Roger that!"

MongoDB change stream listener with message-queue-like (competing consumer) semantics.

Normally, listening to a change stream is more like a topic–that is, each listener receives the change. Additionally, there is no built-in tracking of where you left off. If you...

  • Want your listener to be HA/redundant across multiple processes
  • Do not want to process each change redundantly for each process
  • Want to process changes in order

...then what you want is a queue!

NOTE: This library implements at least once guaranteed delivery, which means it is still possible for a change to be "heard" and processed more than once.

To do this we use a locking algorithm that coordinates multiple listeners.

For more information, see this blog post.