Kafka Streams for Apache Kafkas
Kafka Streams is a Java client library for processing Kafka data as it arrives. An application defines a topology of stateless operations such as map and filter and stateful ones such as aggregations, joins and windows, using local state stores backed by changelog topics, and scales by running more instances.
Stage: Stream Processing · Part of the Apache Kafka roadmap · Last reviewed 19 November 2026
What to learn in Kafka Streams
- Build a topology that reads a topic, filters it and writes to another
- Explain the difference between a KStream and a KTable
- Compute a windowed count with a tumbling window
- Join a stream with a table to enrich events
- Describe how state stores are restored after a restart
Kafka Streams interview questions
What is the difference between a KStream and a KTable?
A KStream is an unbounded sequence of independent events, where every record is a new fact. A KTable is a changelog view in which each key holds only its latest value, like a table that is updated. Aggregations turn a stream into a table.
How does Kafka Streams keep state fault tolerant?
Stateful operations keep data in a local store, often RocksDB, and every change is also written to a compacted changelog topic in Kafka. If an instance fails or moves, the new instance rebuilds the store by replaying the changelog, so no data is lost.
Where Kafka Streams fits in the Apache Kafka roadmap
Kafka Streams belongs to the Stream Processing stage (intermediate level). Compute on streams.
Other units in this stage
Back to the full Apache Kafka roadmap