4 releases (2 breaking)
| 0.3.0 | Aug 20, 2025 |
|---|---|
| 0.2.1 | Aug 20, 2025 |
| 0.2.0 | Aug 18, 2025 |
| 0.1.0 | Jul 29, 2025 |
#1643 in Database interfaces
515 downloads per month
43KB
1K
SLoC
mongo-es
A MongoDB implementation of the PersistedEventRepository trait in cqrs-es.
Usage
Add the following to your Cargo.toml:
[dependencies]
cqrs-es = "0.4.12"
mongo-es = "0.3.0"
Development
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
Dependencies
~12–23MB
~318K SLoC