Skip to main content

Event Store

An append-only database that stores events. The event store is the source of truth for aggregate state.

Characteristics

  • Append-only: Events are never modified or deleted (except for GDPR/legal requirements)
  • Ordered: Events have sequence numbers within each aggregate
  • Immutable: Once written, events cannot change
  • Complete: Contains full history of all state changes

In Angzarr

Angzarr supports multiple event store backends:

  • PostgreSQL (recommended for production)
  • SQLite (standalone/testing)
  • Redis (high-throughput scenarios)
  • NATS JetStream (distributed)

Operations

OperationDescription
AppendAdd new events with sequence validation
Read by rootGet all events for an aggregate
Read by correlationGet events across aggregates in a workflow
Temporal queryGet events at a point in time

Relationship to Read Models

The event store is the write side. Projectors consume events and build read-optimized projections for queries.