Download the PHP package m1x0n/eventsauce-mongo-message-repository without Composer
On this page you can find all versions of the php package m1x0n/eventsauce-mongo-message-repository. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download m1x0n/eventsauce-mongo-message-repository
More information about m1x0n/eventsauce-mongo-message-repository
Files in m1x0n/eventsauce-mongo-message-repository
Package eventsauce-mongo-message-repository
Short Description MongoDB storage implementation for domain events
License MIT
Informations about the package eventsauce-mongo-message-repository
eventsauce-mongo-message-repository
MongoDB implementation for EventSauce message repository.
Requirements
- php: ^7.2
- ext-mongodb: ^1.6
Installation
Testing
Usage
In order to plug-in this repository:
- MongoDB must be installed on your environment. (See
docker-compose.yaml
for example) ext-mongodb
must be installed for php- EventSauce aggregate root repository should be configured like this:
The configuration might be slightly simplified by using dependency injection container.
Event's document structure
Events serialization/deserialization was made using following document structure under the hood:
The most important information is placed under headers
and payload
properties.
Performance
The following unique index should be enforced for better performance either for ConstructingAggregateRootRepository
or ConstructingAggregateRootRepositoryWithSnapshotting
.
It could be done during application bootstrap:
or via mongo shell:
All versions of eventsauce-mongo-message-repository with dependencies
ext-json Version *
ext-mongodb Version ^1.6
eventsauce/eventsauce Version ~0.7
mongodb/mongodb Version ^1.5
ramsey/uuid Version ^3.9