📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials Apache Kafka Kafka Interview Prep

Kafka Interview Prep

5 min read Quiz at the end
Key Kafka interview topics: partitions, consumer groups, acks, at-least-once, lag, rebalancing.

Kafka Interview Topics

  • Topic vs Queue — Kafka topics retain messages; queues delete on consume; Kafka allows replay
  • Partition ordering — ordering is guaranteed per partition, not across partitions
  • Consumer group — each partition assigned to one consumer; groups scale independently
  • acks=all — safest; waits for all in-sync replicas; use in production
  • At-least-once delivery — default; messages may be re-delivered on failure
  • Exactly-once — use enable.idempotence=true on producer + transactional API
  • Retention — messages kept for a configured time (default 7 days) regardless of consumption
  • Rebalance — when a consumer joins/leaves a group, partitions are reassigned
  • Lag — how far behind a consumer is from the latest message in a partition
Topic Quiz · 2 questions

Test your understanding before moving on

1. What is consumer lag in Kafka?
💡 Lag = latest offset - consumer committed offset; high lag means the consumer cannot keep up.
2. What is the key advantage of Kafka over a traditional message queue?
💡 Kafka retains messages on disk — different consumer groups can read independently and replay from any offset.