transactional outbox
A transactional outbox records an event alongside the business change in one database transaction.
Use this when A database write and event publication must not drift apart.
without the term
“We save the order and then send an 'order created' message to the queue. If the server crashes in between, the message is lost. Can you make that reliable?”
with the term · How do you ask a model for transactional outbox?
Use a transactional outbox for this event. Test crashes around commit and publication, with idempotent consumers for repeated delivery.
What is transactional outbox?
The business change and the event are written to the database in one transaction. A separate process reads the event table and publishes, retrying until it succeeds.
Why does transactional outbox matter when vibe coding?
A crash between committing data and sending a message can lose the event.
How do you do transactional outbox?
Commit the business record and outbox record together, then publish with retry and duplicate handling.
What goes wrong with transactional outbox?
Deleting the outbox record before publication has been safely acknowledged.