Last Updated: May 26, 2026
Event sourcing stores state changes as an append-only sequence of events instead of storing only the latest state.
It is useful when history is part of the domain, but it changes how teams model data, query state, evolve schemas, replay events, and handle privacy.
This chapter covers how event sourcing differs from state-based persistence, how event streams are structured, how state is rebuilt, snapshots, projections, command handling, optimistic concurrency, schema evolution, its relationship with CQRS, operational risks, and when to use the pattern.