Building Event-Driven Backends
Queues, outboxes and sagas for systems that never lose a message
By Omar El Alaoui
One-time purchase
€25.95
VAT included
where applicable
- Download starts the moment you pay
- Reads anywhere a PDF does
- Edition updates come free
- Checkout handled securely
About the book
What you’re getting into
Direct calls between services are simple right up until one of them is down. Event-driven design trades that fragility for a different set of problems — duplicate messages, ordering, and state smeared across services — and this book is about solving them for real. You'll build backends around durable events, keep data consistent without distributed transactions, and design flows that heal themselves after a failure.
After you’ve read it
What you’ll be able to do
- Decide when events beat direct service calls — and when they don't
- Design events with payloads and names that survive change
- Build consumers that stay correct under at-least-once delivery
- Solve the dual-write problem with the transactional outbox
- Coordinate long-running work with sagas and compensations
- Keep per-key ordering without crippling throughput
- Handle replay, backfills, dead letters and poison messages
- Operate and debug an event-driven system in production
Table of contents
- 01
When Direct Calls Stop Working
- Coupling and cascading failure
- The shape of an event system
- When not to go event-driven
- 02
Events Worth Emitting
- Event, command and message
- Naming and payload design
- Versioning events over time
- 03
Delivery Guarantees, Honestly
- At-least-once as the default
- Idempotent consumers
- The myth of easy exactly-once
- 04
The Transactional Outbox
- The dual-write problem
- Outbox and relay pattern
- Ordering and deduplication
- 05
Choreography and Sagas
- Long-running workflows
- Compensating actions
- Timeouts and stuck sagas
- 06
Ordering, Partitioning and Keys
- Per-key ordering guarantees
- Partition hot spots
- Reordering on the consumer
- 07
Contracts Between Services
- Schema registries
- Backward and forward compatibility
- Consumer-driven contracts
- 08
Replay, Backfill and Dead Letters
- Reprocessing history safely
- Dead-letter queues
- Quarantining poison messages
- 09
Operating an Event-Driven System
- Tracking lag and throughput
- Debugging a lost message
- A production checklist
The full chapter list, exactly as it appears in your PDF.
More in Backend Engineering