Apache Kafka is a distributed event streaming platform. At its heart is a simple idea: an append-only log, split into topics and partitions, that producers write to and consumers read from at their own pace by tracking offsets. Because messages are stored durably and replicated across brokers, many independent systems can read the same events, replay history and recover after failures. Kafka underpins data pipelines, microservice communication and real-time analytics. Learnr teaches Kafka through short lessons and scenario questions that move from the log model to delivery semantics and stream processing.
How to learn Apache Kafka, step by step
- Run a local cluster. Start a single broker with the official Docker image in KRaft mode, which no longer needs ZooKeeper. Use the command line tools to create a topic, produce a few messages and consume them from the beginning.
- Learn partitions and keys hands-on. Create a topic with several partitions and produce messages with keys such as user ids. Observe that the same key always lands in the same partition, and that ordering holds only within a partition.
- Experiment with consumer groups. Start two consumers in one group and watch partitions split between them, then add a third and trigger a rebalance. Inspect committed offsets and reset them to replay old events.
- Study durability settings. Learn what replication factor, min.insync.replicas and acks=all do together, and what an idempotent producer prevents. Stop a broker during a test and check whether any acknowledged messages were lost.
- Write a producer and consumer in code. Use a client library in Java, Python or Go to build a small order pipeline. Handle retries, commit offsets after processing, and send malformed messages to a dead letter topic instead of crashing.
- Add Connect and stream processing. Stream rows from a database with a Kafka Connect source connector and aggregate events with Kafka Streams or a similar engine. Brief Learnr lessons help keep delivery semantics and config names clear.
What you'll learn
- Explain topics, partitions, offsets, brokers and consumer groups
- Choose message keys to control partitioning and per-key ordering
- Configure producers and consumers for at-least-once or exactly-once processing
- Reason about replication, in-sync replicas and acks settings
- Move data in and out with Kafka Connect and process it with Kafka Streams
How long does it take to learn Apache Kafka?
Developers can understand the core model and write basic producers and consumers in 2 to 3 weeks at 5 hours a week. Operating clusters, tuning performance and designing reliable pipelines takes several months of practical experience.
What you need before you start
Programming in Java, Python, Go or a similar language, command line comfort and basic Docker. An understanding of distributed systems ideas like replication helps but can be learned along the way.
Common mistakes to avoid
- Expecting global ordering across a whole topic. Kafka orders messages only within a partition, so key related events together.
- Committing offsets before processing finishes, which silently loses messages if the consumer crashes. Commit after the work is done.
- Creating far more partitions than needed up front. More partitions add overhead and longer recovery, so size them from expected throughput.
How Learnr builds your course
Type your topic
Tell Learnr you want to learn Apache Kafka, or get as specific as you like.
Get a personalized course
Learnr instantly builds a full Apache Kafka course tailored to your goal and skill level.
Learn and level up
Move through bite-sized lessons and interactive practice, earning XP and keeping your streak.
Apache Kafka questions, answered
Is Kafka a message queue?
Not exactly. Traditional queues usually delete a message once it is consumed, while Kafka keeps events for a retention period so many consumer groups can read and replay them. Recent versions add share groups for queue-style consumption, but the core model is a durable log.
Do I need ZooKeeper to run Kafka?
Not anymore. Newer Kafka versions use KRaft, a built-in consensus layer, and Kafka 4.0 removed ZooKeeper support entirely. Older tutorials that start with ZooKeeper are out of date.
Explore more courses
More data and ai courses
- Learn Elasticsearch
- Learn Vector Databases
- Learn Databricks
- Learn BigQuery
- Learn Matplotlib
- Learn ggplot2
- Learn Microsoft Access
- Learn Power Automate
Ready to learn Apache Kafka?
Start your free, personalized Apache Kafka course in seconds. It will be typed in and ready when you get there.
Start learning Apache KafkaFree to start. No credit card.