Skip to content
Ameen Abozaid
Planned lessonMID-028-L09

Demo: what a rebalance does to in-flight messages

  • Lesson 9 of 9
  • 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

observe duplicate delivery on rebalance. Prepares MID-028-LAB1.

Draft outline details

Step by step

  1. Start two inventory consumers; note partition assignments.
  2. Make the handler slow (5 s) and record each processed eventId.
  3. Kill one consumer mid-processing; watch partitions reassign.
  4. The surviving consumer re-reads from the last committed offset; show a message processed twice.
  5. Planned mistake: enable auto-commit before processing and show a message lost on a crash. Fix by committing after processing.
  6. Add an idempotency check on eventId and replay; the duplicate no longer has an effect.

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.

Type to search levels, phases, modules and lessons.