PrepCity

Outbox pattern

Open the lab

By the last page, this is the design you will have built. Drag it, or Show all, to see every part.

Lesson · 7 pages · about 4 min

Outbox pattern

Write the order and its event in one database transaction; a relay publishes the event later, possibly twice, and consumers deduplicate.

Words you’ll learn

  • Service
  • Row
  • Outbox
  • Commit
  • Event
  • Polling
  • Kafka
  • Offset
  • At-least-once delivery
  • Database

Page by page