Pattern 51 / CONSISTENCY

Outbox Pattern

Use this when Reliably publishing events after a database write.

Pressure
Reliably publishing events after a database write
Mechanism
Persist the business change and outbound event in the same transaction; a relay later publishes pending events
Toll
Requires a relay, dedupe, monitoring, and cleanup of old outbox rows
Architecture plate51
Diagram for Outbox Pattern
Executive brief

Outbox Pattern fits when Reliably publishing events after a database write. Mechanism: Persist the business change and outbound event in the same transaction; a relay later publishes pending events. Use it for Order workflows, audit events, domain events, integration events. The toll: Requires a relay, dedupe, monitoring, and cleanup of old outbox rows.

Use when

Order workflows, audit events, domain events, integration events.

Example

Use outbox pattern when order workflows, audit events, domain events, integration events..

Review framing

Describe the pressure first, then the mechanism, then the cost. That keeps the design grounded.

Same pressure family

Consistency / Messaging

52Inbox Pattern53Transactional Messaging
โ† 5052 โ†’