Learn
Learn Kafka
Kafka from the log up: what a broker does, how topics and consumer groups behave, and how to read a cluster back, with code you can run.
Type
Level
Series · 6 lessons
Kafka fundamentals
Start here if you have never run Kafka: one broker first, then topics and the log, producers, consumers and their offsets, consumer groups, and consumer lag. Each lesson builds on the one before, and more lessons follow.
Beginnerabout 2 h 55 min
Start the series- 01A single-node Kafka cluster with KRaftStart one KRaft broker with Docker Compose, run a small workload through it, and read the cluster back with Kafka's own tools.Tutorial
- 02Topics, partitions and the log underneathCreate, change and delete topics with Kafka's own tools, watch keys choose partitions, and open the data directory to read the log a partition keeps on disk.Tutorial
- 03Producing: keys, partitions and orderingWrite a producer in Java or Python, watch the key choose a partition and keep one bike's records in order, read the state the broker keeps about your producer, and see where records without a key go.Tutorial
- 04Consuming: offsets, groups and where to startRead a topic with the console consumer and with a consumer of your own in Java or Python, see where a group's committed offsets live, choose where a new group starts, and see what automatic commits do when a consumer crashes.Tutorial
- 05Consumer groups and partition assignmentRun three copies of one consumer as a group in Java or Python, watch the broker share six partitions among them as members join and leave, compare its two assignors, uniform and range, and see how the newer group protocol differs from the classic one.Tutorial
- 06Consumer lag and resetting offsets safelyRun a producer that writes faster than one slow consumer in Java or Python can bill, and read the lag the group tools report as it grows, piles up behind a crashed member and falls back to zero; then move a group's committed offsets safely, with a dry run first, and delete them.Tutorial

