Guarantee at-least-once delivery for a critical event?

This tests your grasp of atomicity without 2PC. A great answer outlines the Transactional Outbox pattern: write the event to a DB table in the same transaction as the business logic, then use a relay process. A red flag is relying on simple try/catch blocks.
This tests your ability to design for atomicity across distributed systems without using brittle two-phase commits (2PC). A strong answer outlines the Transactional Outbox pattern: 1) write the event to an 'outbox' table in the same DB transaction as the business logic, 2) use a separate relay process to poll the table and send the event. Acknowledge this implies at-least-once delivery, requiring an idempotent consumer. A red flag is sending the event *after* the DB commit, which is not crash-safe.
Read the original → microservices.io
- #system design
- #distributed systems
- #data integrity
- #messaging
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.