Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

How Sourcery Compares

Sourcery borrows inspiration from projects like eventually and cqrs but makes different trade-offs.

AreaTypical ES/CQRS librariesSourcery
Event modellingEvents are enum variants tied to one aggregateEvents are standalone structs, reusable across aggregates
ProjectionsCoupled to a specific aggregate enumDecoupled — subscribe to event types from any aggregate
MetadataOften embedded in event payloadsCarried alongside events in the envelope; domain types stay pure
InfrastructureBundled command bus, outbox, saga orchestratorMinimal — repository + store only; you add what you need
Event versioningExplicit upcaster pipelinesSerde attributes on event structs (details)
Concurrency controlRuntime configurationType-level — Optimistic vs Unchecked (details)

See Design Decisions for the full rationale behind each choice.