Explains the Outbox and Inbox patterns for building reliable event-driven systems. The Outbox pattern solves the problem of database updates succeeding while event publishing fails, by writing both the business record and the outbox item atomically, then publishing asynchronously via DynamoDB Streams and EventBridge Pipes. The Inbox pattern addresses duplicate event delivery by storing processed event IDs as deduplication keys using conditional DynamoDB writes. The post also covers the distinction between inbox-based deduplication and idempotency keys, and discusses safe ordering of inbox writes relative to business logic, including a locking approach for flows with intermediate side effects.
Table of contents
The problem with naive event publishingThe Outbox PatternThe Inbox PatternFinal thoughtsRelated Posts2 Comments
Sort: