Demo: losing an event without an outbox
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
reproduce the dual-write loss, then fix it. Prepares MID-029-LAB1.
Draft outline details
Step by step
- Start
orders, Kafka, and a consumer log; place an order and see the event arrive. - Add a
Thread.sleep(or a kill hook) betweenrepo.saveandkafka.send. - Place an order and
kill -9the service during the pause; restart and check: the order exists, no event ever arrives. - Planned mistake: "fix" it by moving
sendinside@Transactionaland repeat the kill. The event is still lost (or sent for a rolled-back order). Fix: it is the same dual write. - Add the outbox table and relay; repeat the kill and watch the event arrive after restart.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.