Q. Which Kafka component stores metadata about topics and partitions in older versions?

  • (A) Kafka Broker
  • (B) Kafka Controller
  • (C) ZooKeeper
  • (D) Kafka Streams
πŸ’¬ Discuss
βœ… Correct Answer: (C) ZooKeeper
Explanation: ZooKeeper was used for storing metadata like topic and partition information.

Q. Kafka is best suited for which type of data processing?

  • (A) Batch processing
  • (B) Stream processing
  • (C) Static data processing
  • (D) Relational processing
πŸ’¬ Discuss
βœ… Correct Answer: (B) Stream processing
Explanation: Kafka is designed for real-time stream processing of data.

Q. In Kafka, how are consumer offsets stored in newer versions?

  • (A) In a MySQL database
  • (B) In each broker’s filesystem
  • (C) In Kafka's internal topic
  • (D) In ZooKeeper
πŸ’¬ Discuss
βœ… Correct Answer: (C) In Kafka's internal topic
Explanation: Newer Kafka versions store consumer offsets in the internal topic '__consumer_offsets'.

Q. Which is NOT a valid delivery guarantee in Kafka?

  • (A) At most once
  • (B) At least once
  • (C) Exactly once
  • (D) Multiple times
πŸ’¬ Discuss
βœ… Correct Answer: (D) Multiple times
Explanation: 'Multiple times' is not a defined delivery guarantee in Kafka.

Q. What happens if a Kafka topic does not exist when a producer tries to send data?

  • (A) Producer shuts down
  • (B) Kafka throws an exception
  • (C) Kafka auto-creates the topic (if configured)
  • (D) Message is sent to a default topic
πŸ’¬ Discuss
βœ… Correct Answer: (C) Kafka auto-creates the topic (if configured)
Explanation: If auto topic creation is enabled, Kafka will create the topic automatically.

Q. Kafka achieves durability primarily through:

  • (A) Replication and disk-based logs
  • (B) RAM storage
  • (C) Periodic polling
  • (D) Topic compaction
πŸ’¬ Discuss
βœ… Correct Answer: (A) Replication and disk-based logs
Explanation: Kafka ensures durability by writing data to disk and replicating across brokers.

Q. What does the 'bootstrap.servers' configuration specify?

  • (A) Only ZooKeeper addresses
  • (B) All Kafka brokers in the cluster
  • (C) One or more brokers to initially connect
  • (D) List of Kafka topics
πŸ’¬ Discuss
βœ… Correct Answer: (C) One or more brokers to initially connect
Explanation: 'bootstrap.servers' provides initial brokers that a client connects to for cluster metadata.

Q. Kafka retains data based on:

  • (A) Consumer read status
  • (B) Producer write status
  • (C) Time or size limit set on topic
  • (D) Message priority
πŸ’¬ Discuss
βœ… Correct Answer: (C) Time or size limit set on topic
Explanation: Kafka retains data based on configured time or size thresholds, not consumer status.

Q. Kafka topics can be configured to retain messages:

  • (A) Until the broker restarts
  • (B) Until consumed
  • (C) Forever
  • (D) Based on retention settings
πŸ’¬ Discuss
βœ… Correct Answer: (D) Based on retention settings
Explanation: Kafka allows message retention to be configured per topic.

Q. The default format for Kafka message key and value is:

  • (A) YAML
  • (B) Avro
  • (C) Byte array
  • (D) XML
πŸ’¬ Discuss
βœ… Correct Answer: (C) Byte array
Explanation: Kafka messages use byte arrays for keys and values by default.