mongodb-message-store
Table of contents
General info
A message store implementation of the Eventide project logic for a microservice architecture for MongoDB. It is based on the message store module found in the book 'Practical Microservices' by Ethan Garofolo. This implementation uses MongoDB database as storage instad of the message-db. I have also implemented every part of the code anew and according to my own preferences, for better learning and also to avoid any copyrights issues. I did this project solely for the purpose of increasing my own understanding of how the microservice architecture and event sourcing should work.
Features
- Write messages
- Read messages
- Load entities with projection
- Subscribe to streams
Sources
- Logic based on code by Ethan Garofolo accompanying the book Practical Microservices.
- The message and streams naming logics follow the logic of the Eventide project.
Technologies
- mongoose 5.10.13 => MongoDB object modeling tool.
- uuid 8.3.1
- ava 3.13.0 => Test framework
- mongodb-memory-server 6.9.2 => In memory MongoDB implementation (used for testing).
Setup
Install
Test
$ npm test