Node.js · Senior · Question 37 of 75
What problem does the transactional outbox pattern solve?
- 1Backing up the database
- 2Sending emails faster
- ✓Correct answer: Saving a change in the database and publishing an event reliably: both happen, or neither, without distributed transactions
Explanation
The event is written to an outbox table in the same transaction as the change. A separate worker publishes outbox rows to the broker and marks them sent, so delivery is at least once.