| Crates.io | mongo-es |
| lib.rs | mongo-es |
| version | 0.3.0 |
| created_at | 2025-07-29 12:05:41.857367+00 |
| updated_at | 2025-08-20 23:23:15.741662+00 |
| description | A MongoDB implementation of the cqrs-es event store. |
| homepage | |
| repository | https://github.com/impierce/mongo-es |
| max_upload_size | |
| id | 1772300 |
| size | 135,345 |
A MongoDB implementation of the PersistedEventRepository trait in cqrs-es.
Add the following to your Cargo.toml:
[dependencies]
cqrs-es = "0.4.12"
mongo-es = "0.3.0"
All unit tests run against a local MongoDB instance which can be started using the provided compose.yaml file. A default "standalone" MongoDB instance does not support transactions, so a single-node replica set is configured.
[!NOTE] Unit tests need to be run serially due to a single shared MongoDB instance for all tests. If tests are executed in parallel, assertions can happen concurrently and produce flaky results. Serial execution can be achieved by running the tests with nextest or by adding a simple option to
cargo testas described below.
docker compose up -d
cargo nextest run
# or
cargo test -- --test-threads=1