Top 5 Kafka Interview Questions
Browse 5 real-world technical and behavioral interview questions about Kafka. Review scenarios, edge cases, and architectural best practices.
Your services talk through events and one consumer has been down for an hour. What has it missed, and how does it catch up?
A Kafka-style consumer down for an hour has missed an offset range, not necessarily lost data. If retention still covers the gap, it resumes from the committed offset; catch-up needs surplus throughput, idempotent handlers, event-time logic and a plan for retention expiry. Use this event driven answer to show the decision, trade-off, and evidence rather than a memorised definition.
Consumer lag on your orders topic climbs every morning and never clears before the next peak. Work through it.
Lag is the integral of arrival rate minus service rate, so establish which of the two moved and whether the consumer is slow or stalled. Check lag per partition before per group, rule out a rebalance loop, and remember that adding consumers beyond the partition count does nothing.
You need to add one field to an event and remove another, and five teams consume it. How does that roll out?
Additive changes with defaults are safe, removals are not, so split every removal into deprecate-then-delete with evidence that nobody reads the field. Register the schema, pick a compatibility mode deliberately, and note that backward compatibility requires consumers to deploy first.
How do you prevent a malformed Kafka payload from poison-pilling a critical partition without violating strict financial audit requirements?
An architectural examination of Dead Letter Queues, atomic offset management, and schema enforcement in high-throughput Kafka consumers. Use this distributed systems answer to show the decision, trade-off, and evidence rather than a memorised definition. It also connects KAFKA to the point an interviewer is testing.
Your broker stops accepting writes for twenty minutes. What does each producer do, and what should you have decided before it happened?
Every producer must have a declared answer — block, buffer to a bounded local store, or drop — chosen per event class rather than once for the whole fleet, because the default of blocking on a full in-memory buffer turns a broker outage into an outage of every service that publishes to it.