Kafka MCQs – Kafka Architecture and Core Concepts

21.) What does a Kafka offset represent?

A) Sequence number of a message within a partition
B) Partition number
C) ID of the producer
D) Topic index

Answer: Option A

Explanation: Offsets are unique sequence numbers per message in a partition.

22.) Where are offsets stored by default in Kafka (newer clients)?

A) In memory
B) Zookeeper
C) __consumer_offsets topic
D) Broker configuration file

Answer: Option C

Explanation: Kafka stores committed offsets in a special internal topic.

23.) What happens during a consumer group rebalance?

A) Topics get deleted
B) Partitions are reassigned among consumers
C) Producers stop producing
D) Brokers are restarted

Answer: Option B

Explanation: Rebalancing redistributes partitions among consumers in a group.

24.) Kafka replication factor determines:

A) Number of copies of a partition
B) Number of partitions per broker
C) Number of topics
D) Number of producers

Answer: Option A

Explanation: Replication factor determines how many broker replicas hold the same partition data.

25.) What is the purpose of the Kafka controller broker?

A) Encrypting messages
B) Monitoring disk I/O
C) Managing partition leadership
D) Storing messages

Answer: Option C

Explanation: The controller broker handles leadership changes and cluster coordination tasks.

26.) Kafka achieves high throughput using:

A) Memory-only queues
B) Multi-threaded consumers
C) Large XML payloads
D) Sequential disk I/O and batching

Answer: Option D

Explanation: Kafka uses sequential writes and message batching to boost performance.

27.) Kafka handles backpressure using:

A) Circuit breakers
B) Disk buffering and retries
C) Rate limiting only
D) Dropping messages

Answer: Option B

Explanation: Kafka handles spikes in load by buffering messages on disk and allowing retries.

28.) Which Kafka file stores actual messages?

A) .meta
B) .log
C) .config
D) .json

Answer: Option B

Explanation: Kafka stores message data in log segment files with a .log extension.

29.) What is segment rolling in Kafka logs?

A) Encryption rotation
B) Archiving schema files
C) Creating a new file after a configured size or time
D) Deleting old messages immediately

Answer: Option C

Explanation: Kafka rolls over to new log segments periodically based on time or file size.

30.) In Kafka, each topic partition is mapped to:

A) A consumer group
B) A set of replicas
C) A schema definition
D) A file format

Answer: Option B

Explanation: Each partition has a leader and replicas for fault tolerance.

Leave a Reply

Your email address will not be published. Required fields are marked *