All challenges
intermediateReal-World Systems~50 min

Transactional Outbox

Never lose an event, never write a lie. The outbox pattern solves the dual-write problem: instead of writing to your database and then publishing to a message broker (two systems that can disagree when one fails), you write the business row and the event to the same database in one transaction, then a relay ships the events out. Build the atomic write, the polling relay, and an idempotent consumer that makes at-least-once delivery safe.