Home / Practice / Interview Prep Kafka Interview Questions 150 questions with reference answers. Start a session to practise in one sitting, as multiple choice, flip cards or a written answer, or browse the list and open any question in place. What you get wrong stays easy to find.
Start a session Stay on one page until you are done. Your answers update your progress.
1 · How do you want to answer?
Multiple choice Pick the right answer and get the explanation straight away. Fastest. Flip cards Read the question, answer in your head, reveal it, rate yourself. Write it out Type an answer and see which key concepts you covered.
2 · What to practise?
Level All Beginner Intermediate Advanced Spring Scenario
Focus Everything Not started To review Saved Topic All topics Architecture Core Concepts Internals Internals Deep Dive Kafka 4.x Operations Performance Production Scenarios Spring Kafka Advanced Spring Kafka Basics Spring Kafka Configuration Spring Kafka Error Handling Spring Kafka Testing
How many 10 20 50 All 150
All levels · 20 questions · multiple choice
About 10 minutes.
Start session 0 of 150 answered
0 got it · 0 shaky · 0 missed · 150 to do
Browse all questions Level All 150 Beginner Intermediate Advanced Spring Scenario
Status All To do To review Got it
Showing 150 of 150 questions
Beginner40 questions Not started. #1 What is Apache Kafka and what problem does it solve? Core ConceptsNot started. #2 What is a Kafka topic and how is it different from a traditional queue? Core ConceptsNot started. #3 What is a partition in Kafka and why are they important? Core ConceptsNot started. #4 What is an offset in Kafka? Core ConceptsNot started. #5 What is the role of a Kafka broker? Core ConceptsNot started. #6 What is a consumer group? Core ConceptsNot started. #7 What is the difference between at-most-once, at-least-once, and exactly-once delivery? Core ConceptsNot started. #8 What is the replication factor? Core ConceptsNot started. #9 What are acks in Kafka producer configuration? Core ConceptsNot started. #10 What is the High Watermark (HWM)? Core ConceptsNot started. #11 What is consumer lag? OperationsNot started. #12 How do you increase the throughput of a Kafka consumer? OperationsNot started. #13 What does auto.offset.reset=earliest vs latest do? OperationsNot started. #14 What is enable.auto.commit and why is it dangerous? OperationsNot started. #15 What is Kafka's data retention and how is it configured? Core ConceptsNot started. #16 How does Kafka differ from a traditional message queue? Core ConceptsNot started. #17 What is a Kafka producer and how does key-based partitioning work? Core ConceptsNot started. #18 How does Kafka guarantee message ordering? Core ConceptsNot started. #19 What are Kafka's built-in compression types? Core ConceptsNot started. #20 What is a dead letter queue (DLT) in Kafka? OperationsNot started. #21 What is the ISR (In-Sync Replicas) set? Core ConceptsNot started. #22 What is ZooKeeper's role in traditional Kafka and what replaced it? Core ConceptsNot started. #23 What is the default log retention period in Kafka? Core ConceptsNot started. #24 How do you view Kafka consumer group lag? OperationsNot started. #25 What is min.insync.replicas and when does it matter? Core ConceptsNot started. #26 What is a Kafka record/message structure? Core ConceptsNot started. #27 What happens when a Kafka broker goes down? Core ConceptsNot started. #28 What is log compaction and when would you use it? Core ConceptsNot started. #29 What is the difference between kafka-console-producer and kafka-console-consumer? OperationsNot started. #30 What serialization formats are commonly used with Kafka? Core ConceptsNot started. #31 What is the bootstrap.servers configuration on a Kafka client? Core ConceptsNot started. #32 What ports does a Kafka broker listen on by default, and how are they configured? OperationsNot started. #33 How does a consumer know which offset to start from? Core ConceptsNot started. #34 What is Kafka Streams? Core ConceptsNot started. #35 What is Kafka Connect? Core ConceptsNot started. #36 What is the difference between Kafka's @KafkaListener and manual polling? Core ConceptsNot started. #37 How are records converted to and from bytes in Kafka clients and in Kafka Connect? Core ConceptsNot started. #38 What is the purpose of the __consumer_offsets topic? Core ConceptsNot started. #39 What is the kafka-topics.sh tool used for? OperationsNot started. #40 What happens if a consumer group has more consumers than partitions? Core ConceptsIntermediate35 questions Not started. #41 Explain the producer request lifecycle with acks=all in detail. InternalsNot started. #42 What is the difference between LEO and HWM? Why does it matter for consumers? InternalsNot started. #43 How does Kafka handle leader election when a broker fails? InternalsNot started. #44 How would you tune a Kafka producer for maximum throughput? PerformanceNot started. #45 What causes consumer rebalancing and how can you minimize it? PerformanceNot started. #46 What is the difference between Kafka's request queue and the Purgatory? InternalsNot started. #47 How do you safely perform a rolling upgrade of a Kafka cluster? OperationsNot started. #48 What is the significance of max.in.flight.requests.per.connection in relation to ordering? InternalsNot started. #49 Explain the Kafka controller's responsibilities in KRaft mode. InternalsNot started. #50 What is the OS page cache and why does it matter for Kafka performance? PerformanceNot started. #51 How does Kafka use sendfile() for zero-copy transfer? InternalsNot started. #52 What is partition reassignment and when do you need it? OperationsNot started. #53 What is the difference between sticky and cooperative sticky partition assignment? InternalsNot started. #54 How do you prevent consumer lag from growing under high load? PerformanceNot started. #55 What is Kafka's log segment and why does it matter? InternalsNot started. #56 How would you debug a 'LEADER_NOT_AVAILABLE' error in production? OperationsNot started. #57 What is unclean leader election and why is it dangerous? InternalsNot started. #58 What is the significance of num.partitions for a topic? PerformanceNot started. #59 How do you reset consumer offsets to reprocess messages? OperationsNot started. #60 What is Kafka's inter-broker replication protocol? InternalsNot started. #61 How does Kafka guarantee message ordering with multiple producers? OperationsNot started. #62 What is the impact of increasing Kafka's JVM heap size? PerformanceNot started. #63 What is Kafka's wire protocol and how does versioning work? InternalsNot started. #64 What are the main JMX metrics to monitor for a healthy Kafka cluster? OperationsNot started. #65 How does a Kafka producer handle a NOT_LEADER_OR_FOLLOWER error? InternalsNot started. #66 How does Kafka achieve low latency with acks=all? PerformanceNot started. #67 What is rack awareness in Kafka and why is it important? OperationsNot started. #68 What is Kafka's RecordAccumulator and how does it buffer messages? InternalsNot started. #69 How does Kafka handle message schema evolution, and what do teams do about it? OperationsNot started. #70 What is the difference between Kafka's Fetch API and consumer.poll()? InternalsNot started. #91 Why can a handful of failures flood a dead letter queue with thousands of messages? OperationsNot started. #92 What does a minimum-viable DLQ configuration need, and why does each setting matter? OperationsNot started. #93 How does Kafka's design deal with failing nodes and the cost of the network? ArchitectureNot started. #161 What did Kafka 4.0 remove regarding ZooKeeper, and what must a ZooKeeper-mode cluster do before it can upgrade to 4.0? Kafka 4.xNot started. #163 What are Kafka share groups, and when would you use one instead of a consumer group? Kafka 4.xAdvanced22 questions Not started. #71 Explain Kafka's exactly-once semantics implementation end-to-end. Internals Deep DiveNot started. #72 What is the Kafka Raft (KRaft) consensus algorithm and how does it differ from ZooKeeper-based metadata management? Internals Deep DiveNot started. #73 How does Kafka handle log truncation during replica recovery? Internals Deep DiveNot started. #74 What is the epoch fencing mechanism in Kafka transactions? Internals Deep DiveNot started. #75 How does Kafka's TimingWheel work and why is it used in Purgatory? Internals Deep DiveNot started. #76 Explain the Kafka consumer's heartbeat threading model and how it relates to max.poll.interval.ms. Internals Deep DiveNot started. #77 What is Kafka's sparse index format and how does binary search work on it? Internals Deep DiveNot started. #78 How would you diagnose and fix high producer latency (P99 > 500ms)? PerformanceNot started. #79 What is the Outbox Pattern and how does Kafka enable it? ArchitectureNot started. #80 How would you implement the Saga pattern using Kafka? ArchitectureNot started. #81 Explain event sourcing with Kafka. What are the trade-offs? ArchitectureNot started. #82 What is the __transaction_state topic and how does it work? Internals Deep DiveNot started. #83 How would you handle a Kafka cluster with millions of partitions? PerformanceNot started. #84 What is the Kafka Mirror Maker 2 (MM2) and how does multi-cluster replication work? OperationsNot started. #85 Explain the Kafka consumer group coordinator and rebalance protocol in detail. Internals Deep DiveNot started. #86 How does Kafka handle backpressure from slow consumers? PerformanceNot started. #87 How does event sourcing relate to read-optimized state in Kafka, and how does CQRS fit in? ArchitectureNot started. #88 How does Kafka's compaction work internally? What is the cleaner thread? Internals Deep DiveNot started. #89 What is the effect of fsync on Kafka performance and when should you configure it? PerformanceNot started. #90 How would you design a Kafka-based event-driven microservices architecture? ArchitectureNot started. #162 How does the KIP-848 consumer rebalance protocol differ from the classic protocol, and how does a consumer opt in? Kafka 4.xNot started. #165 What does Kafka 4.2 add to Kafka Streams for failing records, and what limits does the new Streams rebalance protocol have? Kafka 4.xSpring30 questions Not started. #101 How do you configure a Kafka consumer in Spring Boot? Spring Kafka BasicsNot started. #102 How do you produce messages with KafkaTemplate? Spring Kafka BasicsNot started. #103 How do you configure retry and dead letter topics in Spring Kafka? Spring Kafka Error HandlingNot started. #104 How do you configure Kafka transactions in Spring Kafka? Spring Kafka ConfigurationNot started. #105 How do you set up manual offset commits in Spring Kafka? Spring Kafka ConfigurationNot started. #106 What is the difference between concurrency and partitions in Spring Kafka's listener container? Spring Kafka ConfigurationNot started. #107 How do you handle deserialization errors in Spring Kafka? Spring Kafka Error HandlingNot started. #108 How do you implement a batch @KafkaListener in Spring Kafka? Spring Kafka AdvancedNot started. #109 What is spring.kafka.consumer.isolation-level and when do you need it? Spring Kafka ConfigurationNot started. #110 How do you test Kafka listeners in Spring Boot? Spring Kafka TestingNot started. #111 How do you configure Spring Kafka for JSON serialization with type information? Spring Kafka AdvancedNot started. #112 What is SeekToCurrentErrorHandler (now DefaultErrorHandler) in Spring Kafka? Spring Kafka AdvancedNot started. #113 How do you configure multiple @KafkaListener annotations for the same topic with different group IDs? Spring Kafka ConfigurationNot started. #114 What is spring.kafka.listener.missing-topics-fatal? Spring Kafka AdvancedNot started. #115 How does @KafkaListener handle partition assignment and offset control? Spring Kafka AdvancedNot started. #116 What is the KafkaAdmin bean and how do you use it to manage topics? Spring Kafka AdvancedNot started. #117 How do you write a Spring Kafka integration test without external Kafka? Spring Kafka TestingNot started. #118 How do you configure the consumer to start from the beginning for a new application deployment? Spring Kafka ConfigurationNot started. #119 What is spring.kafka.listener.ack-mode RECORD vs BATCH vs MANUAL? Spring Kafka AdvancedNot started. #120 How does Spring Kafka's @RetryableTopic differ from blocking retries with DefaultErrorHandler? Spring Kafka Error HandlingNot started. #121 How do you implement request-reply pattern with Spring Kafka? Spring Kafka AdvancedNot started. #122 What is the difference between ProducerFactory and KafkaTemplate in Spring Kafka? Spring Kafka ConfigurationNot started. #123 How do you use Kafka headers in Spring Kafka? Spring Kafka AdvancedNot started. #124 How do you configure consumer listener concurrency for optimal throughput? Spring Kafka AdvancedNot started. #125 What happens if a @KafkaListener throws an uncaught exception? Spring Kafka ConfigurationNot started. #126 How do you configure Spring Kafka consumer groups for multi-tenancy? Spring Kafka AdvancedNot started. #127 What is the difference between DefaultErrorHandler and CommonErrorHandler in Spring Kafka? Spring Kafka Error HandlingNot started. #128 How do you configure Spring Kafka for Avro with Confluent Schema Registry? Spring Kafka ConfigurationNot started. #129 What is spring.kafka.streams and how do you use Kafka Streams in Spring Boot? Spring Kafka AdvancedNot started. #130 How do you control the number of messages processed per @KafkaListener invocation? Spring Kafka ConfigurationScenario23 questions Not started. #94 Your DLQ has 25,000 unread messages that built up over the last week. Walk through how you'd triage it. Production ScenariosNot started. #141 Your Kafka cluster shows UnderReplicatedPartitions > 0. Walk through your debugging steps. Production ScenariosNot started. #142 A consumer group suddenly shows 100,000 messages of consumer lag. How do you respond? Production ScenariosNot started. #143 You're seeing duplicate messages in your consumer application. How do you identify the source and fix it? Production ScenariosNot started. #144 How do you safely add a new topic and deploy a new consumer without downtime? Production ScenariosNot started. #145 A production broker runs out of disk space. What happens and how do you recover? Production ScenariosNot started. #146 Your Spring Boot Kafka consumer stops consuming after processing a malformed message. How do you fix it? Production ScenariosNot started. #147 How do you migrate a Kafka topic to a new cluster with zero data loss? Production ScenariosNot started. #148 Design a Kafka topic schema for an e-commerce order processing system. Production ScenariosNot started. #149 A Kafka Streams application is falling behind. How do you scale it? Production ScenariosNot started. #150 How do you implement exactly-once delivery in a Kafka-to-database pipeline? Production ScenariosNot started. #151 What would you check first if consumers are reading the same messages multiple times after a deployment? Production ScenariosNot started. #152 Design a high-throughput event ingestion pipeline with Kafka. Production ScenariosNot started. #153 A Kafka producer is experiencing high p99 latency. List 5 potential causes and fixes. Production ScenariosNot started. #154 How would you implement an audit log system using Kafka? Production ScenariosNot started. #155 Explain how you'd handle a multi-region Kafka deployment for disaster recovery. Production ScenariosNot started. #156 How do you handle schema evolution when you have 50 consumers reading a Kafka topic? Production ScenariosNot started. #157 What's your strategy for monitoring Kafka in production with 100+ topics? Production ScenariosNot started. #158 How do you safely increase the partition count of an existing Kafka topic? Production ScenariosNot started. #159 What is the maximum number of consumer groups that can read the same Kafka topic simultaneously? Production ScenariosNot started. #160 How would you debug a 'Network Exception: Disconnected' error in a Kafka producer? Production ScenariosNot started. #164 A colleague says "Kafka has diskless topics now, so we can drop the broker disks." How do you respond? Kafka 4.xNot started. #166 A team wants to move a running consumer group to the new rebalance protocol without downtime. What do they do, and what do they check first? Kafka 4.x