Q. What is the role of ZooKeeper in Kafka?

  • (A) To store messages
  • (B) To track topic creation
  • (C) To manage configuration and leader election
  • (D) To produce data
πŸ’¬ Discuss
βœ… Correct Answer: (C) To manage configuration and leader election
Explanation: ZooKeeper coordinates distributed systems and handles metadata for Kafka clusters.

Q. How can Kafka provide exactly-once delivery semantics?

  • (A) By disabling offsets
  • (B) By using transactions and idempotent producers
  • (C) By writing to disk multiple times
  • (D) By disabling replication
πŸ’¬ Discuss
βœ… Correct Answer: (B) By using transactions and idempotent producers
Explanation: Exactly-once semantics are achieved using idempotent producers and transactional APIs.

Q. Which tool can be used to replicate Kafka data across clusters?

  • (A) MirrorMaker
  • (B) Kafka Streams
  • (C) Kafka Monitor
  • (D) Kafka Router
πŸ’¬ Discuss
βœ… Correct Answer: (A) MirrorMaker
Explanation: MirrorMaker is a tool used to mirror Kafka data between clusters.

Q. What is the minimum number of brokers required in a Kafka cluster?

  • (A) 1
  • (B) 2
  • (C) 3
  • (D) 5
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1
Explanation: Kafka can run with just one broker, though this is not fault-tolerant.

Q. What does the 'linger.ms' setting in Kafka producer do?

  • (A) Delays a message before delivery
  • (B) Waits before sending batches to improve throughput
  • (C) Delays consumer polling
  • (D) Waits for a broker response
πŸ’¬ Discuss
βœ… Correct Answer: (B) Waits before sending batches to improve throughput
Explanation: 'linger.ms' lets the producer wait for more records to batch together to improve throughput.

Q. What is a Kafka cluster?

  • (A) A group of topics
  • (B) A group of partitions
  • (C) A group of brokers working together
  • (D) A group of consumers
πŸ’¬ Discuss
βœ… Correct Answer: (C) A group of brokers working together
Explanation: A Kafka cluster is made up of multiple brokers that work together to handle messaging.

Q. Kafka is best suited for which type of systems?

  • (A) Real-time data processing systems
  • (B) Image rendering systems
  • (C) Static content hosting
  • (D) Relational database management
πŸ’¬ Discuss
βœ… Correct Answer: (A) Real-time data processing systems
Explanation: Kafka is designed for real-time streaming and processing of large volumes of data.

Q. What is the maximum size of a Kafka message by default?

  • (A) 1 MB
  • (B) 5 MB
  • (C) 10 MB
  • (D) 1 GB
πŸ’¬ Discuss
βœ… Correct Answer: (A) 1 MB
Explanation: By default, Kafka allows a maximum message size of 1 MB unless configured otherwise.

Q. Kafka topics are divided into which of the following?

  • (A) Shards
  • (B) Partitions
  • (C) Tables
  • (D) Pages
πŸ’¬ Discuss
βœ… Correct Answer: (B) Partitions
Explanation: Kafka topics are split into partitions for scalability and parallel processing.

Q. Which Kafka consumer API allows asynchronous processing?

  • (A) poll()
  • (B) subscribe()
  • (C) seek()
  • (D) callback()
πŸ’¬ Discuss
βœ… Correct Answer: (A) poll()
Explanation: The poll() method in Kafka's consumer API allows asynchronous fetching of messages.