Outbox Pattern

Noun · Development

Definitions

  1. A pattern for reliable event publishing in microservices: instead of directly publishing to a message broker (which can fail independently of the database), write the event to an outbox table in the same database transaction as the business data. A separate process reads the outbox and publishes to the broker. Guarantees at-least-once delivery without distributed transactions.

    In plain English: Saving events in a database table alongside business data, then publishing them to a message broker separately, ensuring nothing gets lost.

    Example: "The order service writes the order AND an OrderCreated event to the outbox table in one transaction -- the CDC connector publishes it to Kafka."

Related Terms