PrepZone Logo
PrepZone
Back to Database

Database · Hard

What is the transactional outbox pattern and which problem does it solve?

DatabaseTransactionsStaffDistributed Systems

Answer preview

The transactional outbox solves the dual-write problem: you cannot atomically write to your database and publish to Kafka, because they are two independent systems with no shared transaction. Instead you write the event into an outbox table in the same local transaction, and a se…