Q. Which of the following ensures coordination between Kafka brokers?

  • (A) Apache Flink
  • (B) Apache Storm
  • (C) ZooKeeper
  • (D) Kafka Connect
πŸ’¬ Discuss
βœ… Correct Answer: (C) ZooKeeper
Explanation: ZooKeeper is used by Kafka for managing cluster metadata and leader election.

Q. What does a Kafka producer do?

  • (A) Reads data from topics
  • (B) Writes data to topics
  • (C) Deletes old topics
  • (D) Manages consumer offsets
πŸ’¬ Discuss
βœ… Correct Answer: (B) Writes data to topics
Explanation: A Kafka producer is responsible for publishing messages to a topic.

Q. Which setting determines the durability of a Kafka message?

  • (A) acks
  • (B) retries
  • (C) compression.type
  • (D) linger.ms
πŸ’¬ Discuss
βœ… Correct Answer: (A) acks
Explanation: The 'acks' setting controls the acknowledgment behavior and hence the durability of the message.

Q. Which delivery semantics is NOT supported by Kafka?

  • (A) At most once
  • (B) At least once
  • (C) Exactly once
  • (D) Never once
πŸ’¬ Discuss
βœ… Correct Answer: (D) Never once
Explanation: Kafka supports at most once, at least once, and exactly once delivery semantics.

Q. What is the default Kafka message retention policy?

  • (A) Delete after 24 hours
  • (B) Keep forever
  • (C) Delete after 7 days
  • (D) Delete after 1 hour
πŸ’¬ Discuss
βœ… Correct Answer: (A) Delete after 24 hours
Explanation: By default, Kafka retains messages for 24 hours unless configured otherwise.

Q. Which Kafka component helps to transform and move data between systems?

  • (A) Kafka Streams
  • (B) Kafka Connect
  • (C) Kafka Producer
  • (D) Kafka Broker
πŸ’¬ Discuss
βœ… Correct Answer: (B) Kafka Connect
Explanation: Kafka Connect is used to integrate Kafka with other data systems using connectors.

Q. Which of the following is a stream processing library for Kafka?

  • (A) Kafka Streams
  • (B) Kafka Connect
  • (C) Kafka Broker
  • (D) Kafka Manager
πŸ’¬ Discuss
βœ… Correct Answer: (A) Kafka Streams
Explanation: Kafka Streams is a Java library for building real-time stream processing applications using Kafka.

Q. What is the function of the Kafka retention policy?

  • (A) To limit the number of producers
  • (B) To delete old messages after a time or size limit
  • (C) To restart brokers automatically
  • (D) To increase consumer speed
πŸ’¬ Discuss
βœ… Correct Answer: (B) To delete old messages after a time or size limit
Explanation: Kafka uses retention policies to delete old data based on time or log size.

Q. Which Kafka component enables building distributed stream processing applications?

  • (A) Kafka Streams
  • (B) Kafka Connect
  • (C) Kafka Broker
  • (D) Kafka Producer
πŸ’¬ Discuss
βœ… Correct Answer: (A) Kafka Streams
Explanation: Kafka Streams is a client library used for building stream processing apps.

Q. What happens to messages in Kafka if no consumer reads them?

  • (A) They are deleted immediately
  • (B) They are stored until the retention period expires
  • (C) They are sent back to the producer
  • (D) They are stored permanently
πŸ’¬ Discuss
βœ… Correct Answer: (B) They are stored until the retention period expires
Explanation: Kafka stores messages until the retention policy deletes them, regardless of consumer activity.