The outbox pattern closes the reliability gap between a committed database change and asynchronous side effects. Write the core change and an outbox_event row in one transaction; a separate worker delivers the event after commit. section 8.4
Booking confirmation after a crash
A booking may commit successfully while the server crashes before creating its calendar event or sending a notification. With an outbox row written alongside the booking, a worker can drain the pending event after the API returns 201 Created. section 8.4
Use the pattern to investigate asynchronous fan-out:
- Identify the core database transaction and its associated external side effects. section 8.4
- Check whether a crash between COMMIT and the external call can silently drop work. section 8.4
- Trace the worker that drains outbox events after the user-facing response. section 8.4
Figure 8.7 The outbox pattern prevents lost side effects. Without it, a crash after the COMMIT but before the webhook call drops the event silently. With the pattern, an outbox_event row is written in the same transaction as the booking. A separate worker drains the outbox after the commit, ensuring the webhook survives the crash.

Compare the failure path without an outbox against the transactional row and worker path that preserves the event. section 8.4



