Outbox
Making the event atomic with the business write it describes.
4 to work through
-
intermediate
A service must update its database and publish an event. Why is doing both directly incorrect, and what does the outbox pattern guarantee?
2 min answer -
advanced
A financial platform needs state changes to reliably produce events. When is the transactional outbox the right choice and when is change data capture better?
2 min answer -
advanced
A service must update its database and publish an event, and both must happen or neither. Why is a dual write wrong, and how do the outbox pattern and log-based capture compare?
3 min answer -
advanced
Orders are occasionally created in the database with no corresponding event reaching the warehouse. No errors are logged. Diagnose and fix.
3 min answer
4 terms in this topic
Contract Event
An event a system deliberately emits with a schema it owns and a meaning it controls, as opposed to a captured row change that exposes the producer's…
patternOutbox Relay
The process that reads pending messages from an outbox table and publishes them to a broker, providing at-least-once delivery with no distributed tra…
patternTransactional Outbox
Writing an event into a table within the same transaction as the business change, then publishing it separately - so the event exists if and only if …
patternTransactional Outbox
Writing an event into the same database transaction as the state change, then relaying it, to eliminate the dual-write problem.
Neighbouring topics
Architecture Patterns
General material on architectural patterns and their trade-offs.
Layered Architecture
The default shape, its clarity, and where a technical partition fails.
Event-Driven Architecture
Publishing facts, and trading comprehensibility for decoupling.
Pipes and Filters
Independent transformation steps composed into a pipeline.
Publish/Subscribe
Broadcast to every subscriber, as distinct from work distribution.
Competing Consumers
Scaling throughput with instances, at the cost of ordering.
Saga
Local transactions with compensating actions across services.
CQRS
Separate models for writing and reading, each optimised for its job.
Event Sourcing
The event log as the system of record, with state as a projection.
Strangler Fig
Incremental replacement behind a routing facade.
Anti-Corruption Layer
Translating a foreign model at the boundary so it does not leak in.
Sidecar & Ambassador
Cross-cutting behaviour in a co-deployed process.
Service Mesh
Sidecars applied estate-wide, and the scale at which that pays.
API Gateway
A single entry point for policy, routing and protocol translation.
Backend for Frontend
A narrow backend per client experience, owned by that client's team.
Cell-Based Architecture
Complete isolated copies each serving a subset of customers.
Sharding Patterns
Directory versus embedded keys, logical shards and rebalancing.
Materialized Views
Precomputed query results, refreshed incrementally or in full.
Orchestration vs Choreography
A coordinator that knows the flow, or services that react to events.