The short answer: Kafka interviews test whether you understand how data is organized (topics, partitions, keys), how it’s consumed (consumer groups, offsets, rebalancing), how it’s kept safe (replication, acknowledgments, in-sync replicas), delivery guarantees (at-most-once, at-least-once, exactly-once), and how to operate and tune it. Experienced roles add scenario questions such as consumer lag, ordering problems or a broker failure. Below are the common questions with short answers, grouped by area.
Core concepts
“What is Kafka, and what is event streaming?”
Apache Kafka is a distributed event streaming platform. The Kafka documentation describes event streaming as “capturing data in real-time from event sources like databases, sensors, mobile devices, cloud services, and software applications in the form of streams of events.”
“What is an event?”
In Kafka’s words, an event “records the fact that ‘something happened’.” It has a key, a value, a timestamp and optional headers.
“What are producers, consumers and topics?”
Producers write events; consumers read them. “Events are organized and durably stored in topics,” similar to a folder of files.
“What is a partition?”
A topic is split into partitions spread across brokers, so it can scale. Events with the same key go to the same partition.
Ordering
“Does Kafka guarantee ordering?”
Only within a partition. Kafka “guarantees that any consumer of a given topic-partition will always read that partition’s events in exactly the same order as they were written.” There’s no ordering across partitions, so use a key (such as a customer ID) for events that must stay in order.
Consumers
“What is a consumer group?”
Consumers that share a group ID divide a topic’s partitions between them, so each partition is read by only one consumer in the group. Different groups each get all the messages.
“What happens if you have more consumers than partitions?”
The extra consumers sit idle. The number of partitions limits parallelism within a group.
“What is an offset?”
The position of a message in a partition. Consumers commit offsets to record what they’ve processed, so they can resume after a restart.
“What is a rebalance?”
Redistributing partitions among a group’s consumers when one joins, leaves or fails. Rebalances pause consumption briefly, so frequent ones hurt throughput.
“What is consumer lag, and how do you reduce it?”
How far a consumer is behind the latest messages. Reduce it by adding consumers (up to the partition count), adding partitions, speeding up processing, or batching.
Replication and durability
“How does replication work?”
Each partition has a leader and follower replicas on other brokers. The documentation notes that topics can be replicated “so that there are always multiple brokers that have a copy of the data.” A replication factor of 3 is common in production.
“What are in-sync replicas (ISR)?”
Replicas that are caught up with the leader. With acks=all, the producer waits until all in-sync replicas have the write; combined with min.insync.replicas, this protects against data loss.
Delivery semantics
“Explain at-most-once, at-least-once and exactly-once.”
- At-most-once: messages may be lost but never duplicated (commit offsets before processing).
- At-least-once: no loss, but possible duplicates (commit after processing); make consumers idempotent.
- Exactly-once: achieved with idempotent producers and transactions for read-process-write flows within Kafka.
“What does an idempotent producer do?”
It prevents duplicate writes caused by retries, so each message is written once per partition.
Storage
“What’s the difference between retention and log compaction?”
Retention deletes old data by time or size. Log compaction keeps at least the latest value for each key, which suits topics that represent current state.
Performance
“How do you improve producer throughput?”
Batch more (batch.size, linger.ms), compress messages, and use asynchronous sends, while balancing latency.
“How do you choose the number of partitions?”
Based on target throughput and consumer parallelism, with room to grow. Too many partitions increase overhead and recovery time.
Scenario questions
- “Consumer lag keeps growing. What do you check?” Processing time per message, consumer errors and rebalances, partition skew, and whether you have enough consumers.
- “Some events are processed out of order. Why?” They probably landed in different partitions; key them by the entity that needs ordering.
- “A broker goes down. What happens?” Leadership for its partitions moves to in-sync replicas on other brokers; check under-replicated partitions and producer settings.
- “You see duplicate messages downstream.” Check producer retries and idempotence, offset commit timing, and make consumers idempotent.
Behavioral questions
- Tell me about a streaming pipeline you built or maintained.
- Tell me about an incident with Kafka and how you resolved it. See solving a complex problem.
See also our data engineer interview questions and system design interview guide.
Frequently asked questions
What are common Kafka interview questions?
Does Kafka guarantee message ordering?
What is a consumer group in Kafka?
How does Kafka achieve exactly-once processing?
What is log compaction?
Sources
- Apache Kafka, Introduction. Read on 1 October 2026.