mongo-es

Crates.iomongo-es
lib.rsmongo-es
version0.3.0
created_at2025-07-29 12:05:41.857367+00
updated_at2025-08-20 23:23:15.741662+00
descriptionA MongoDB implementation of the cqrs-es event store.
homepage
repositoryhttps://github.com/impierce/mongo-es
max_upload_size
id1772300
size135,345
Nander Stabel (nanderstabel)

documentation

README

mongo-es

Crates.io Version codecov

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 test as described below.

docker compose up -d

cargo nextest run
# or
cargo test -- --test-threads=1
Commit count: 1

cargo fmt