Skip to content

Improved MongoDB driver for Event Horizon

License

Notifications You must be signed in to change notification settings

gjongenelen/eh-mongodb

Repository files navigation

Build Status codecov GoDoc Go Report Card

eh-mongodb

This package is based on the default mongo-driver in EventHorizon. Mongo has a document limit of 16MB which can easily be reached in big projects, resulting in aggregates with many events not being saved.

The default mongo-driver in EventHorizon stores an aggregate with its events in one single document, increasing the size of the document on each event. This driver creates a new document per event, preventing documents from growing and reaching the limit mentioned above.