Skip to main content
Design Patterns event-sourcing optional

Event Sourcing Patterns

Store state changes as immutable events for audit trails, temporal queries, and system reconstruction.

Difficulty
advanced
Read time
1 min read
Version
v1.0.0
Confidence
established
Last updated

Quick Reference

Event Sourcing: Store state as sequence of immutable events, not current state. Events are facts (OrderPlaced, not OrderWasPlaced). Use snapshots for long streams. Project events to read models. Never delete events—use compensating events. Include correlation/causation IDs.

Use When

  • Audit trail requirements
  • Temporal queries needed
  • Complex domain logic
  • System reconstruction

Skip When

  • Simple CRUD applications
  • No audit requirements
  • Team unfamiliar with pattern

Event Sourcing Patterns

Store state changes as immutable events for audit trails, temporal queries, and system reconstruction.

Tags

event-sourcing events audit-trail architecture cqrs

Discussion