Concept
Outbox pattern
The outbox pattern makes saving data and publishing an event about it behave as one step. The service writes the event into an outbox table in the same database transaction as the data, and a separate relay publishes rows from that table. A crash can delay an event, but it can no longer lose one or publish one for data that was never saved.
Where you'll see it
Related concepts
Sources: Airbnb: Avoiding double payments in a distributed payments system ↗ · Uber: Reliable reprocessing and dead letter queues ↗ · Jay Kreps: The Log ↗ · Report a problem
The definition is in our own words; the sources are those of the lesson Outbox pattern.