📨 Apache Kafka — interview questions

11 questions. Filter by what the role asks for; open one for the six layers of the answer. The course is where the answers come from.

11 of 11

01A topic has 6 partitions and a consumer group has 20 instances. Why are 14 of them doing nothing, and why can't you fix it by adding more consumers?Partitionseasy0-2y02A team enabled `enable.auto.commit=true` believing it gives at-least-once delivery. What can it actually lose, and why?Offsetsmedium0-2y03Replication factor 3, `acks=all`. A team wants writes to survive one broker failing with no data loss and no downtime. What else has to be set, and why does `acks=all` alone not guarantee it?Replicationmedium0-2y04What's the difference between a topic with `cleanup.policy=delete` and one with `cleanup.policy=compact`, and when would you use compaction?Storagemedium3-5y05A consumer joins a group of ten and the whole group stops processing for several seconds. Walk through why, and what changed between Kafka's original rebalance protocol and the cooperative one.Consumer groupshard3-5y06How does Kafka's idempotent producer prevent a retry from creating a duplicate record, mechanically?Producershard3-5y07A consumer that deserialises a corrupted record enters a crash loop and never reaches its own error-handling code. Why, and how does a dead-letter setup actually fix it?Error handlingmedium3-5y08A team is choosing between Kafka and RabbitMQ for a new pipeline. What's the actual model difference, and how does it change the decision beyond raw throughput?Messaging modelseasy0-2y09A lag alert fires. How do you tell from the lag data alone whether it's a capacity problem, a stuck partition, or a rebalance loop?Operationsmedium5-8y10A team advertises their Kafka pipeline as 'exactly-once end to end.' What does Kafka's exactly-once actually cover, and where does that claim break down?Delivery guaranteessenior8+y11Two copies of the same Kafka record — a genuine redelivery after a rebalance — arrive at a consumer's idempotency check at nearly the same instant, on different threads. Why does a plain `SELECT` check for 'already processed' fail to prevent a duplicate charge, and what actually closes the gap?Idempotencyhard5-8y