Skip to content
Ameen Abozaid
Planned lessonMID-029-L06

Demo: losing an event without an outbox

  • Lesson 6 of 7
  • Mid-level
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

  1. Start orders, Kafka, and a consumer log; place an order and see the event arrive.
  2. Add a Thread.sleep (or a kill hook) between repo.save and kafka.send.
  3. Place an order and kill -9 the service during the pause; restart and check: the order exists, no event ever arrives.
  4. Planned mistake: "fix" it by moving send inside @Transactional and repeat the kill. The event is still lost (or sent for a rolled-back order). Fix: it is the same dual write.
  5. 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.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Continue to next lesson

Type to search levels, phases, modules and lessons.