Eveneum is a simple, developer-friendly Event Store with snapshots, backed by Azure Cosmos DB.
var database = "Eveneum";
var collection = "Events";
var client = new CosmosClient("connection-string");
var databaseResponse = await client.CreateDatabaseIfNotExistsAsync(database);
var containerResponse = await databaseResponse.Database
.CreateContainerIfNotExistsAsync(new ContainerProperties(collection, "/StreamId"));
IEventStore eventStore = new EventStore(client, database, collection);
await eventStore.Initialize();
var streamId = Guid.NewGuid().ToString();
EventData[] events = GetEventsToWrite();
await eventStore.WriteToStream(streamId, events);
await eventStore.CreateSnapshot(streamId, 7, GetSnapshotForVersion(7));
await eventStore.ReadStream(streamId);
The aim of the project is to provide a straightforward implementation of Event Store by utilising the features of Azure Cosmos DB. The library will benefit from automatic indexing, replication and scalability offered by Cosmos DB.
- Ability to store and read stream of events in a single method call. The library will handle retries and batching,
- Ability to store and read snapshots, including support for reading a snapshot and only consecutive events,
- Ability to customize the schema of documents stored in Cosmos DB to allow for rich querying capabilities,
- Built-in optimistic concurrency checks,
- "Cosmos DB Change Feed"-friendly design to enable building independent projections using Change Feed.
All documentation is available in wiki
Eveneum has been used in Production in a multi-tenant system since Oct 2018, is considerred stable and is being maintained. Any bugs will be fixed as priority.
Please create issues for all bugs / feature requests here.
If you're looking for training / mentoring in the areas of event-sourcing / CosmosDB than contact me directly.