EventFlow is a .NET CQRS and event-sourcing library with pluggable stores, read models, sagas, and optional NuGet integrations for databases and messaging.
Overview
EventFlow is a CQRS plus event sourcing framework for .NET that prioritizes straightforward defaults while remaining replaceable at each core interface. It avoids background worker threads and ships under the MIT license.
Applications model aggregates, route commands through a command bus, persist event streams to an event store, project read models for queries, and react with subscribers or sagas. Snapshots, metadata, value objects, scheduled jobs, event upgraders, and outbound event publishing (including RabbitMQ) are first-class concepts.
Event stores and read models support in-memory test backends plus SQL Server, SQLite, PostgreSQL, Entity Framework Core, Elasticsearch, MongoDB, and related NuGet packages. Version 1 aligns with modern .NET and Microsoft dependency injection abstractions; an older branch retains .NET Framework compatibility.
Defaults include in-memory stores for quick examples and a shipping sample inspired by domain-driven design literature. Interfaces throughout the core let teams swap persistence, messaging, and projection implementations when requirements diverge from stock behavior.
Key features
- Aggregates and command bus
- Pluggable event store backends
- Read models and subscribers
- Sagas and scheduled jobs
- Optional snapshots for aggregates
- Event upgraders for schema drift
- RabbitMQ event publishing package
- Interface-based extensibility
Use cases
- Domain-driven CQRS services
- Event-sourced microservices
- Long-lived aggregate workflows
- Projection-heavy read sides
- Teaching CQRS with in-memory stores