Q. Which Kafka component helps to mirror data between clusters?

  • (A) Kafka Streams
  • (B) Kafka MirrorMaker
  • (C) Kafka Producer
  • (D) Kafka Connect
πŸ’¬ Discuss
βœ… Correct Answer: (B) Kafka MirrorMaker
Explanation: Kafka MirrorMaker replicates data from one Kafka cluster to another.

Q. What happens when a Kafka broker fails?

  • (A) Data is lost
  • (B) Partitions are deleted
  • (C) Another replica becomes leader
  • (D) ZooKeeper shuts down
πŸ’¬ Discuss
βœ… Correct Answer: (C) Another replica becomes leader
Explanation: A new leader is elected from the in-sync replicas when a broker fails.

Q. Kafka messages are stored in:

  • (A) Databases
  • (B) Partitions as logs
  • (C) ZooKeeper nodes
  • (D) Consumer memory
πŸ’¬ Discuss
βœ… Correct Answer: (B) Partitions as logs
Explanation: Kafka stores messages in log files that are maintained per partition.

Q. Kafka’s throughput is highest when:

  • (A) Small messages are sent individually
  • (B) Batching and compression are used
  • (C) ZooKeeper is disabled
  • (D) Messages are encrypted
πŸ’¬ Discuss
βœ… Correct Answer: (B) Batching and compression are used
Explanation: Batching and compression improve throughput significantly.

Q. Which tool is used to manage Kafka topics?

  • (A) Kafka Shell
  • (B) kafka-topics.sh
  • (C) Kafka Broker CLI
  • (D) ZooKeeper Admin
πŸ’¬ Discuss
βœ… Correct Answer: (B) kafka-topics.sh
Explanation: kafka-topics.sh is used to create, list, and manage Kafka topics.

Q. What does Kafka’s `auto.offset.reset=earliest` do?

  • (A) Always starts from the last message
  • (B) Starts consuming from the beginning of the topic
  • (C) Skips all messages
  • (D) Deletes all partitions
πŸ’¬ Discuss
βœ… Correct Answer: (B) Starts consuming from the beginning of the topic
Explanation: It ensures the consumer reads from the beginning if no offset is found.

Q. Which feature allows Kafka to provide durability?

  • (A) In-memory caching
  • (B) Message priority
  • (C) Replication across brokers
  • (D) Offset expiration
πŸ’¬ Discuss
βœ… Correct Answer: (C) Replication across brokers
Explanation: Replication ensures messages are not lost even if a broker fails.

Q. What is the default format of Kafka message timestamps?

  • (A) Epoch milliseconds
  • (B) ISO-8601
  • (C) Kafka date string
  • (D) Partition ID
πŸ’¬ Discuss
βœ… Correct Answer: (A) Epoch milliseconds
Explanation: Kafka uses epoch milliseconds for message timestamps.

Q. Kafka brokers are identified by:

  • (A) Topic name
  • (B) Broker ID
  • (C) Host IP
  • (D) Consumer group ID
πŸ’¬ Discuss
βœ… Correct Answer: (B) Broker ID
Explanation: Each broker in a Kafka cluster has a unique broker ID.

Q. What does the `acks=all` setting ensure?

  • (A) Message is sent without confirmation
  • (B) Only leader acknowledges the message
  • (C) All in-sync replicas acknowledge the message
  • (D) Consumer acknowledges the message
πŸ’¬ Discuss
βœ… Correct Answer: (C) All in-sync replicas acknowledge the message
Explanation: It ensures durability by waiting for all in-sync replicas to acknowledge.