Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Apache Kafka for absolute beginners in Java
Rating: 4.6 out of 5(8,291 ratings)
61,085 students

Apache Kafka for absolute beginners in Java

Start Here - Learn Apache Kafka Ecosystem, Architecture, and Client API Programming in Java
Last updated 10/2026
English
Arabic [Auto],German [Auto],

What you'll learn

  • Explain how Kafka stores and orders data with topics, partitions and offsets, and how one topic is spread across several brokers
  • Describe how KRaft, replication, leaders, followers and the ISR keep a Kafka cluster running when a broker fails
  • Run a 3-broker Kafka cluster in Docker, use the Kafka CLI tools, and configure log segments, retention and compaction
  • Build Java producers with keys, custom partitioning, idempotent delivery, and tuned batching, compression and acks settings
  • Build Java consumers with consumer groups, cooperative rebalancing, safe offset commits and a dead-letter topic for bad messages
  • Reprocess past events by resetting consumer group offsets, or by writing a replay tool that seeks to a point in time

Course content

15 sections • 88 lectures • 17h 52m total length
  • About the Course6:03
  • Course Prerequisites5:08
  • How to access Course Material and Resources1:40
  • How to Access Course Reference Material2:19

Requirements

  • You must be familiar with Java Programming
  • A Windows or macOS computer with 8 GB RAM or more (16 GB recommended)

Description

Learn Apache Kafka the way data and AI engineers use it: hands-on, in Java, on a real multi-broker cluster.

Why learn Kafka, and how to learn it

Apache Kafka is the backbone of real-time data. It moves events between services, feeds data pipelines, and keeps machine learning models and AI applications supplied with fresh data instead of yesterday's batch. Many engineers use Kafka for years without knowing what happens inside it. They copy a configuration, hope for the best, and struggle when messages are duplicated, delayed or lost.

This course takes the opposite approach. You will run a 3-broker Kafka cluster in Docker on your own computer, write Java producers and consumers, and then break things on purpose. You will stop a broker, trigger a rebalance, send a bad message and replay old events, so you understand why Kafka behaves the way it does. Concepts come first, then a lab proves them.

What this course covers

  • Batch vs stream processing, and why Kafka sits at the center of real-time data architecture

  • Setting up a 3-broker Kafka cluster with Docker, and working with the Kafka command-line tools

  • Topics, partitions, offsets and how Kafka stores and orders data

  • KRaft, the controller, replication, leaders, followers and the in-sync replica set (ISR)

  • Log segments, retention policies and log compaction

  • Failure labs: what happens when a leader broker or a follower broker goes down

  • The Java Producer API: keys, serialization, delivery callbacks, poll() and flush()

  • Partitioning strategies, including custom partitioners

  • Reliable delivery: retries, idempotent producers, acks and min in sync replicas

  • Producer tuning with linger ms, batch size and compression

  • The Java Consumer API: the poll loop, group id, auto offset reset and heartbeats

  • Consumer groups, group coordination and scaling consumers with partitions

  • Rebalancing: eager vs cooperative-sticky assignment

  • Safe offset management, manual commits and dead-letter topics for poison messages

  • Reprocessing data by resetting consumer group offsets, and by building a replay tool that seeks to a point in time

  • A capstone project: build a real-time order pipeline with two producers, an order loader with a dead-letter topic, a sales aggregator and a replay tool, then test it against crashes and broker failures

What you will take away

  • A clear mental model of how Kafka works internally, not just how to call its API

  • The ability to explain partitions, offsets, replication and the ISR in an interview or a design review

  • A working 3-broker Kafka lab that you can reuse for your own experiments

  • Production-minded Java producers that deliver messages reliably and efficiently

  • Java consumers that scale with consumer groups and handle failures and bad messages safely

  • The skill to diagnose common problems such as consumer lag, rebalances, duplicates and timeouts

  • The confidence to reprocess historical events when a bug or a new requirement demands it

  • A strong foundation for building real-time pipelines that feed analytics, machine learning and AI applications

  • A working, tested real-time pipeline that you built yourself, which you can show in your portfolio or discuss in interviews

Is this course for you?

You need basic Java and some comfort with a terminal. You do not need any Kafka, Docker or Python experience, because every setup step is explained.

This course focuses on core Kafka: brokers, topics, producers and consumers. Kafka Streams, KSQL DB, Kafka Connect, Schema Registry and security are not covered.

If you want to understand Kafka well enough to build with it, fix it when it misbehaves and explain your design choices, this course is for you. Enroll now and start with a running cluster in your first chapter.

Who this course is for:

  • Data engineers whose pipelines run in batches and who now have to deliver data in real time
  • ML and AI engineers who feed models or applications from live event streams and need that data to stay fresh
  • Java backend developers who must publish events to Kafka or consume them reliably in their services
  • Engineers already using Kafka who treat it as a black box and want to understand brokers, offsets and delivery guarantees