ArchitectArchitect (10+ yrs)KafkaSystem DesignUberShopifyNubank
Transactional outbox
How does the transactional outbox pattern prevent lost messages?
Answers use simple, clear English.
Quick interview answer
In the same DB transaction as business state change, write an outbox row. A relay process publishes outbox events to the broker and marks them sent. Consumers stay idempotent.
Detailed answer
In the same DB transaction as business state change, write an outbox row. A relay process publishes outbox events to the broker and marks them sent. Consumers stay idempotent. This avoids dual-write failures between DB and message bus.
architectseniortech-lead#outbox#messaging#consistency