Software Design

Transactional Outbox Pattern for Relays

UML Sequence Diagrams · made in Skemio

Sequence diagram showing Order Service committing to Order DB and an Outbox Relay pushing events to a Message Broker.
Sequence diagram showing Order Service committing to Order DB and an Outbox Relay pushing events to a Message Broker.

What it shows

  • Business entities and outbox events commit in a single local ACID transaction
  • Outbox relay polls records independently to decouple storage from the broker
  • Broker acknowledgment marks records as published to guarantee delivery

The takeaway

Never split database mutations and message publishing into uncoordinated steps; commit them together.

More uml sequence diagrams