Learn. Practice. Feel prepared.
Apache Kafka Objective Questions and Answers - Set 3
This Apache Kafka quiz contains carefully curated objective questions with correct answers and clear explanations. It is designed for developers, data engineers, and interview preparation, covering Kafka internals, distributed messaging concepts, fault tolerance, and real-time streaming best practices. This is part 3 of the series.
Practice Apache Kafka MCQs with Detailed Explanations
Answer at least 12 questions to submit and verify answers.
31 Which configuration controls batching? Medium
Correct answer:
batch.size
batch.size controls the number of bytes to batch before sending.
32 What does linger.ms do? High
Correct answer:
Controls batching delay
linger.ms introduces delay to allow batching for better throughput.
33 Which compression type is supported in Kafka? Medium
Correct answer:
All of the above
Kafka supports multiple compression types including gzip, snappy, and lz4.
34 What is the purpose of min.insync.replicas? High
Correct answer:
Min replicas for write success
Defines minimum replicas that must acknowledge writes.
35 What happens if min.insync.replicas is not met? High
Correct answer:
Write fails
Write fails to maintain consistency guarantees.
36 What is transactional producer used for? High
Correct answer:
Exactly-once writes
Transactional producer ensures atomic writes across partitions.
37 Which isolation level is used for transactions? High
Correct answer:
read_committed
read_committed ensures only committed data is read.
38 Which tool is used to monitor Kafka clusters? Medium
Correct answer:
All of the above
Kafka metrics can be monitored using JMX and tools like Prometheus and Grafana.
39 What is a segment in Kafka log? High
Correct answer:
Partition chunk
Kafka logs are divided into segments for efficient storage management.
40 Which command-line tool is used to produce messages? Medium
Correct answer:
kafka-console-producer
kafka-console-producer is used to send messages to Kafka topics.
41 Which command-line tool is used to consume messages? Medium
Correct answer:
kafka-console-consumer
kafka-console-consumer reads messages from topics.
42 What is the default retention policy? Medium
Correct answer:
Delete
Default cleanup.policy is delete.
43 What is the max size of a Kafka message by default? High
Correct answer:
1MB
Default max.message.bytes is 1MB.
44 Which component handles schema evolution? High
Correct answer:
Schema Registry
Schema Registry manages schemas and compatibility.
45 What is the purpose of Kafka ACLs? Medium
Correct answer:
Access control
ACLs provide fine-grained security controls over Kafka resources.