The Desi Architect
Notes / Messaging and Correctness / Kafka Hands-on Lab
Track 4 · Messaging and Correctness

Kafka Hands-on Lab

Bring up a three-broker Kafka cluster on your laptop and break it on purpose. Keys, consumer groups, offset resets, retention, killing a leader, and a write that a healthy broker refuses.

Hands-on lab40 min read
On this page
  1. Why you should run this once
  2. Bring up the cluster
  3. Exercise 1: Create a topic and read what you wrote
  4. Exercise 2: Keys decide the partition
  5. Exercise 3: Consumer groups and rebalancing
  6. Exercise 4: Offsets, lag and rewinding a group
  7. Exercise 5: Retention removes records, not consumers
  8. Exercise 6: Kill the leader of a partition
  9. Exercise 7: A healthy leader that refuses your write
  10. Exercise 8: Idempotent producer, duplicates and transactions
  11. Exercise 9: Change a setting on a live topic
  12. When something goes wrong
  13. Clean up
  14. What this lab teaches, and what it hides