Kafka, RabbitMQ & Queues
Outbox pattern
The outbox pattern writes an event row in the same database transaction as the business change and relays it to the broker later, which closes the gap where a crash or outage would lose the event.
What you will be able to do
- Explain why a dual write loses events and how an outbox table closes the gap.
- Decide between a poller and change data capture for the relay.
What is in the lesson
- A real situation where this goes wrong
- How it works, step by step
- A walkthrough with commands you can run
- How it fails in production, and how to tell
- Three quiz questions with explanations
Read this lessonFree. No account needed.
More in Kafka, RabbitMQ & Queues
- Retry delay queuesAdvanced · 4 min
A retry delay queue uses a TTL and a dead letter exchange to hold a failed message for a fixed wait, then return it to the work queue, so the consumer stays free.
- BackpressureAdvanced · 4 min
Backpressure slows publishers when queues cannot keep up, and a memory or disk alarm blocks every publisher on the node, so one burst can stall services that have…
- RabbitMQ exchanges: operational verificationAdvanced · 4 min
Verification compares the live exchanges, queues and bindings with the intended design and then checks alarms, which catches a deploy that reported success while one…