Skip to content
Theory · Messaging patterns · lesson 4 of 9

The transactional outbox

The order service saves an order to the database and publishes the event "order 42 created". These are two steps into two different systems, and the process can crash between them. Then the order is in the database but the event is not: the warehouse reserves nothing, the email never goes out, and nobody knows. In the chapter on delivery guarantees we left this producer problem unsolved.

In this lesson

  • Dual write
  • The outbox table
  • The relay
  • A repeat is unavoidable
  • Common mistake
  • Key points