LearnThatStack Ace your next interview
Backend Development
Apache Kafka.
37 Qs 5 free
Change topic Change
Drill · questions

All questions

of 37
Beginner 5
01

Explain the core components of Kafka architecture.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Kafka architecture consists of several key components:

  • Producer: Applications that publish (write) events to Kafka topics
  • Consumer: Applications that subscribe to (read) events from topics
  • Broker: Kafka servers that store data and serve client requests
  • Topic: Categories or feed names to which records are published
  • Partition: Sub-divisions of topics for parallelism and scalability
  • Zookeeper: Coordinates and manages Kafka cluster metadata (being replaced by KRaft)
Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

02

What is a Kafka topic and how does partitioning work?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

A topic is a category or stream name to which producers send messages and from which consumers read messages. Topics are divided into partitions for scalability and parallelism.

Partitioning benefits:

  • Enables parallel processing by multiple consumers
  • Distributes data across multiple brokers
  • Provides ordering guarantees within each partition
  • Allows horizontal scaling

Example: A topic "user-events" with 3 partitions can have messages distributed across partitions 0, 1, and 2 based on a key or round-robin.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

03

What is the role of Zookeeper in Kafka?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Zookeeper manages Kafka cluster coordination and metadata:

Responsibilities:

  • Broker discovery and health monitoring
  • Topic and partition metadata storage
  • Leader election for partitions
  • Consumer group coordination (legacy)
  • Configuration management

Note: Kafka is moving away from Zookeeper dependency with KRaft (Kafka Raft) mode, which handles metadata management internally.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

04

What are Kafka Headers and when would you use them?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Kafka Headers are optional metadata key-value pairs attached to each message record.

Use cases:

  • Routing: Route messages based on headers
  • Tracing: Add correlation IDs for distributed tracing
  • Security: Include authentication tokens
  • Content metadata: MIME types, encoding information
  • Source identification: Origin system information
// Producer adding headers
ProducerRecord<String, String> record = new ProducerRecord<>(
    "my-topic", "key", "value");
record.headers().add("correlation-id", "12345".getBytes());
record.headers().add("source-system", "order-service".getBytes());

Benefits: Headers don't affect partitioning and allow metadata without modifying message payload.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

05

What is Kafka's log retention and cleanup policies?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Kafka supports two cleanup policies:

1. Delete policy (cleanup.policy=delete):

  • Deletes old log segments based on time/size
  • log.retention.hours=168 (7 days default)
  • log.retention.bytes=-1 (unlimited size default)
  • log.segment.bytes=1GB (segment size)

2. Compact policy (cleanup.policy=compact):

  • Keeps the latest value for each key
  • Useful for changelog topics
  • Background compaction process
  • Maintains ordering within partitions

Combined policy:

cleanup.policy=compact,delete
# Both compaction and time-based deletion

Monitoring: Track log size and compaction metrics to ensure proper cleanup.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

Intermediate 22
06

What is the difference between Kafka and traditional message queues?

Part of Pro
07

Explain Kafka producers and their key configurations.

Part of Pro
08

How do Kafka consumers work and what is a consumer group?

Part of Pro
09

What is offset management in Kafka?

Part of Pro
10

Explain Kafka's replication mechanism.

Part of Pro
11

What are Kafka's delivery semantics?

Part of Pro
12

What is Kafka Streams and when would you use it?

Part of Pro
13

Explain Kafka Connect and its purpose.

Part of Pro
14

How does Kafka ensure high throughput?

Part of Pro
15

Explain Kafka's log compaction feature.

Part of Pro
16

What is the difference between `poll()` and `fetch()` in Kafka consumer?

Part of Pro
17

How do you handle schema evolution in Kafka?

Part of Pro
18

Explain Kafka's security features.

Part of Pro
19

What is the purpose of `__consumer_offsets` topic?

Part of Pro
20

How do you monitor Kafka cluster performance?

Part of Pro
21

What causes consumer lag and how do you address it?

Part of Pro
22

What is the difference between Kafka and Apache Pulsar?

Part of Pro
23

What is Kafka MirrorMaker and its use cases?

Part of Pro
24

What is Kafka's approach to backward compatibility?

Part of Pro
25

Explain Kafka's compression and its trade-offs.

Part of Pro
26

What is the difference between at-rest and in-transit encryption in Kafka?

Part of Pro
27

How do you handle duplicate messages in Kafka?

Part of Pro
Expert 10
28

What are Kafka's consistency guarantees?

Part of Pro
29

What are Kafka transactions and how do they work?

Part of Pro
30

Explain Kafka's ISR (In-Sync Replica) mechanism.

Part of Pro
31

How do you tune Kafka for maximum performance?

Part of Pro
32

Explain Kafka's exactly-once semantics implementation.

Part of Pro
33

How does Kafka handle network partitions and split-brain scenarios?

Part of Pro
34

What are some common Kafka anti-patterns to avoid?

Part of Pro
35

How do you implement event sourcing with Kafka?

Part of Pro
36

What is the role of the Kafka Controller?

Part of Pro
37

How do you implement CQRS (Command Query Responsibility Segregation) with Kafka?

Part of Pro

No matches

Try a different filter or search term.

Pro · $10/mo

32 of 37 Apache Kafka answers are gated.

Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.

  • Full answers + code
  • AI explain - simpler, deeper, or visualized
  • 1,000 AI credits / month
  • Cancel anytime

Change topic

Pick a different technology or stack. Your current topic stays put until you choose a new one.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

JAM

JavaScript, APIs, and Markup

Serverless on AWS

Serverless Architecture on AWS

Flutter Mobile

Flutter Cross-Platform Mobile Development

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

Web3 / Ethereum

Solidity, Ethereum, Hardhat, Foundry

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git
Complexity Analysis Arrays Strings Hashing Linked Lists Stacks Queues Trees Heaps Graphs Core Algorithms Operating Systems Concurrency Multithreading Networking Fundamentals Git API Design 45 Distributed Systems Fundamentals 34