A snapshot event carries a representation of an aggregate’s current state. Provider services publish snapshots to let a new CQRS view initialize without replaying the full event history. section 13.3.5
A snapshot-based initialization works as follows:
- Each provider service queries its database and publishes a snapshot for each aggregate. section 13.3.5
- The new view consumes snapshots first, then consumes subsequent non-snapshot state-change events. section 13.3.5
- This limits initialization work to current data and avoids handling archived event versions that predate the snapshots. section 13.3.5
Aggregate snapshots
OrderSnapshot and ConsumerSnapshot are examples of snapshots published for their respective aggregates. section 13.3.5
