Kafka Java programming

A Kafka tutorial for building real applications in Java: project setup, SDK selection, producer callbacks, consumer groups, rebalance listeners and threading.

Build Kafka applications with your preferred programming language

After learning the CLI, it's time to build real applications. This section covers how to write Kafka producers and consumers programmatically, with a focus on Java (the official SDK).

What you'll learn:

  • How to choose a Kafka client library for your language
  • How to set up a Java project with Kafka dependencies
  • How to write producers with keys, callbacks, and batching
  • How to write consumers with consumer groups and graceful shutdown

Available tutorials

TopicDescription
SDK listRecommended client libraries by language
Java programmingComplete Java producer and consumer tutorials
Advanced consumersRebalance listeners, seek/assign, threading
Kafka StreamsStateful stream processing: joins, aggregations, windowing, and production operations

See it in practice with Conduktor

Conduktor Console helps you test your applications by producing and consuming messages, monitoring consumer groups, and inspecting message content during development.

Next steps