Event sourcing and CQRS (Command Query Responsibility Segregation) are architectural patterns that solve specific problems. They also introduce significant complexity. The decision to use them should be based on clear problem fit.
What problem event sourcing solves
Event sourcing stores the history of state changes (events) rather than the current state. Instead of a database row that says 'order status: shipped', you have a sequence of events: OrderPlaced, PaymentConfirmed, OrderPacked, OrderShipped. The current state is derived by replaying the events. The problems this solves: complete audit trail without additional code, the ability to rebuild projections from the event history, and temporal queries (what was the state at a specific time?).
What CQRS solves
CQRS separates the write model (commands that change state) from the read model (queries that return data). The write model is optimised for consistency and business rule enforcement. The read model is optimised for query performance and can be denormalised for the specific queries the application performs. The problem CQRS solves: the conflict between the normalised write model and the denormalised read model in applications with complex reporting requirements.
The operational complexity cost
Event sourcing and CQRS add: an event store, projection engines that maintain read models from events, eventual consistency between the write and read models, and the cognitive load of thinking in events rather than current state. For applications with simple CRUD patterns and no audit or temporal query requirements, this complexity has no benefit. The patterns earn their complexity in systems where the benefits directly address requirements.
MassTransit and EventStoreDB in.NET
MassTransit is the.NET message bus library that makes producer-consumer patterns and saga orchestration manageable. EventStoreDB is the purpose-built event store with projection capabilities and a.NET client library. The combination provides a practical foundation for event sourcing in.NET. Microsoft's Dapr pub/sub building block is an alternative for teams already using Dapr.