Chaos.Mongo.EventStore
1.0.0-rc.2
dotnet add package Chaos.Mongo.EventStore --version 1.0.0-rc.2
NuGet\Install-Package Chaos.Mongo.EventStore -Version 1.0.0-rc.2
<PackageReference Include="Chaos.Mongo.EventStore" Version="1.0.0-rc.2" />
<PackageVersion Include="Chaos.Mongo.EventStore" Version="1.0.0-rc.2" />
<PackageReference Include="Chaos.Mongo.EventStore" />
paket add Chaos.Mongo.EventStore --version 1.0.0-rc.2
#r "nuget: Chaos.Mongo.EventStore, 1.0.0-rc.2"
#:package Chaos.Mongo.EventStore@1.0.0-rc.2
#addin nuget:?package=Chaos.Mongo.EventStore&version=1.0.0-rc.2&prerelease
#tool nuget:?package=Chaos.Mongo.EventStore&version=1.0.0-rc.2&prerelease
Chaos.Mongo.EventStore
Event sourcing for MongoDB with aggregate reconstruction, append-only event streams, optimistic concurrency, idempotency, checkpoints, and transactional callbacks.
Opt-in tamper evidence seals event streams into hash chains and anchors them with RFC 3161 timestamps, so modification, deletion and backdating can be proven to third parties, while personal data stays erasable. The evidence follows an open specification and can be verified without .NET.
Installation
dotnet add package Chaos.Mongo.EventStore
Quick start
Define an aggregate and event:
using Chaos.Mongo;
using Chaos.Mongo.EventStore;
public sealed class OrderAggregate : Aggregate
{
public string CustomerName { get; set; } = string.Empty;
}
public sealed class OrderCreated : Event<OrderAggregate>
{
public string CustomerName { get; set; } = string.Empty;
public override void Execute(OrderAggregate aggregate)
=> aggregate.CustomerName = CustomerName;
}
Register the core MongoDB services and the event store:
using Chaos.Mongo;
using Chaos.Mongo.EventStore;
services.AddMongo("mongodb://localhost:27017", "myDatabase")
.WithEventStore<OrderAggregate>(eventStore => eventStore
.WithEvent<OrderCreated>("OrderCreated")
.WithCollectionPrefix("Orders"));
This is enough for optimistic concurrency on its own: the first append on a connection that can create indexes
creates the unique concurrency index automatically, independent of RunConfiguratorsOnStartup. A connection
without that permission needs the index provisioned out-of-band instead — see the
MongoDB Roles section of
the complete documentation.
Append an event through IEventStore<TAggregate>:
var orderId = Guid.NewGuid();
var order = await eventStore.AppendEventsAsync(
[
new OrderCreated
{
AggregateId = orderId,
CustomerName = "Ada"
}
]);
Package relationships
This package references Chaos.Mongo, which supplies the connection, dependency-injection, transaction, and configuration infrastructure. Chaos.Mongo.Outbox is optional and can be combined with event-store transactional callbacks when event changes must publish external messages reliably.
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. net11.0 is compatible. |
-
net10.0
- Chaos.Mongo (>= 1.0.0-rc.2)
- System.Security.Cryptography.Pkcs (>= 8.0.2)
-
net11.0
- Chaos.Mongo (>= 1.0.0-rc.2)
- System.Security.Cryptography.Pkcs (>= 8.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0-rc.2 | 63 | 11/22/2026 |
| 1.0.0-rc.1 | 75 | 10/31/2026 |
| 0.9.0 | 173 | 9/6/2026 |
| 0.8.0 | 128 | 9/5/2026 |
| 0.7.1 | 158 | 8/25/2026 |
| 0.7.0 | 146 | 8/5/2026 |
| 0.6.0 | 143 | 7/22/2026 |
| 0.5.0 | 170 | 6/2/2026 |
| 0.4.0 | 149 | 4/11/2026 |
| 0.3.0 | 143 | 4/8/2026 |
| 0.2.0 | 140 | 3/30/2026 |
| 0.2.0-preview.2 | 107 | 2/22/2026 |
# v1.0.0-rc.2 (2026-11-22)
### 💥 Breaking Changes
- Trim and rename the remaining public API before 1.0, allow record payloads and reject duplicate outbox discriminators (#305) by @chA0s-Chris
- Retry outbox messages indefinitely instead of dropping them after a short outage (#279) by @chA0s-Chris
- Make tamper-evidence verification results report what was actually proven (#275) by @chA0s-Chris
- Count every queue and outbox delivery attempt, not only handler failures (#277) by @chA0s-Chris
- Make default MongoDB collection names stable and collision-free (#272) by @chA0s-Chris
- Keep persisted field names and the queue processing index stable across BSON conventions (#269) by @chA0s-Chris
- Make distributed lock release reliable after a cancelled renewal (#268) by @chA0s-Chris
- Standardize queue duration metrics to seconds and expand the compatibility policy (#267) by @chA0s-Chris
- Wait for the migration lock, renew it, and reject duplicate IDs (#264) by @chA0s-Chris
- Configure the integrity collection names with a prefix (#228) by @chA0s-Chris
- Align outbox and queue option names (#227) by @chA0s-Chris
- Trim the EventStore public API and reshape the integrity types (#226) by @chA0s-Chris
- Trim the public API of Chaos.Mongo (#225) by @chA0s-Chris
- Trim the Outbox public API (#224) by @chA0s-Chris
- Target net10.0 only and lower dependency minimums (#222) by @chA0s-Chris
- Add IServiceProvider-aware AddMongo overloads and MongoBuilder.ConfigureOptions (#195) by @chA0s-Chris
- Fix event store dropping members inherited from intermediate base classes (#187) by @chA0s-Chris
- Separate stream position from aggregate revision with store-assigned versions, revision-based concurrency, GetAtRevisionAsync and observational events (#166) by @chA0s-Chris
### ✨ Features
- Enforce the certificate policy on every timestamp chain link and refuse to seal events of unregistered types (#302) by @chA0s-Chris
- Add outbox metrics for published, failed and terminally failed messages, publish duration and message age (#292) by @chA0s-Chris
- Add net11.0 as a target framework alongside net10.0 (#291) by @chA0s-Chris
- Name the outbox in processor warning messages (#284) by @chA0s-Chris
- Resolve queue payload handlers in a per-item DI scope (#229) by @chA0s-Chris
- Add tamper-evidence verification to the event store with a stable, independently verifiable format (#200) by @chA0s-Chris
- Add IServiceProvider-based publisher factory to the transactional outbox (#197) by @chA0s-Chris
- Confirm TSA revocation status with CRLs issued after the token time (#190) by @chA0s-Chris
- Store timestamp evidence of tamper-evidence anchors once, so large CRLs no longer stall anchoring (#191) by @chA0s-Chris
- Fix corrected event store registrations failing until restart after a rejected configuration (#189) by @chA0s-Chris
- Add transactional erasure of personal data from sealed events to the event store (#184) by @chA0s-Chris
- Add integrity anchoring with RFC 3161 timestamp authorities to the event store (#172) by @chA0s-Chris
- Track changed event streams for tamper-evidence anchoring (#170) by @chA0s-Chris
- Add tamper-evident per-stream hash chains to the event store (#161) by @chA0s-Chris
### 🐛 Bug Fixes
- Make overlapping stops safe for outbox, queue, sealing and anchoring components (#319) by @chA0s-Chris
- Keep the first notification time when several instances notify the same integrity anchor (#316) by @chA0s-Chris
- Fix migrations continuing after the migration lock's lease was lost (#315) by @chA0s-Chris
- Fix class map registration failing when hosts are built concurrently, and speed up the test suite (#296) by @chA0s-Chris
- Fix idle polling and misleading lock-recovery/standalone signals in MongoDB queues (#283) by @chA0s-Chris
- Skip malformed event documents so anchoring and sealing keep running (#270) by @chA0s-Chris
- Stop timestamp verification from fetching certificate URLs embedded in stored data (#266) by @chA0s-Chris
- Report event store append failures with the correct exception (#265) by @chA0s-Chris
- Stop queue handler timeouts from being treated as shutdown signals (#263) by @chA0s-Chris
- Fix broken index renames and concurrent-startup races in index creation (#262) by @chA0s-Chris
- Prevent outbox batch failures for IAsyncDisposable-only publishers (#261) by @chA0s-Chris
- Prevent duplicate event versions when the concurrency index is missing (#260) by @chA0s-Chris
- Fix ObjectDisposedException when MongoQueue is disposed more than once (#259) by @chA0s-Chris
- Fix published outbox messages staying pending when the processor stops (#178) by @chA0s-Chris
### 📚 Documentation
- Correct the 0.x migration guide and document event evolution, collection names and a production checklist (#306) by @chA0s-Chris
- Complete the 1.0 reference documentation and add a testing guide (#233) by @chA0s-Chris
- Add 1.0 upgrade guide, compatibility policy and requirements (#232) by @chA0s-Chris