Q. Kafka's default behavior when a consumer fails is to:

  • (A) Reassign its partitions to other group members
  • (B) Delete the consumer group
  • (C) Stop the broker
  • (D) Pause the topic
πŸ’¬ Discuss
βœ… Correct Answer: (A) Reassign its partitions to other group members
Explanation: Kafka reassigns the failed consumer’s partitions to other group members.

Q. Kafka producer idempotency prevents:

  • (A) Data compression
  • (B) Message duplication
  • (C) Partition balancing
  • (D) Message loss
πŸ’¬ Discuss
βœ… Correct Answer: (B) Message duplication
Explanation: Idempotent producers ensure that retries do not result in duplicate messages.

Q. Which Kafka component enables real-time stream processing?

  • (A) Kafka Connect
  • (B) Kafka Streams
  • (C) ZooKeeper
  • (D) Kafka Admin
πŸ’¬ Discuss
βœ… Correct Answer: (B) Kafka Streams
Explanation: Kafka Streams is the API for building real-time processing applications.

Q. The Kafka internal topic for storing consumer offsets is:

  • (A) consumer_offsets
  • (B) __offset_topic
  • (C) __consumer_offsets
  • (D) offsets.kafka
πŸ’¬ Discuss
βœ… Correct Answer: (C) __consumer_offsets
Explanation: Kafka stores committed consumer offsets in the internal topic '__consumer_offsets'.

Q. Kafka uses which of the following to ensure message durability?

  • (A) ZooKeeper
  • (B) Replication
  • (C) Producer retries
  • (D) Compression
πŸ’¬ Discuss
βœ… Correct Answer: (B) Replication
Explanation: Replication ensures that messages are stored redundantly across brokers.

Q. Kafka messages are deleted based on which criteria?

  • (A) Consumer offset
  • (B) Broker memory
  • (C) Retention time or size
  • (D) Producer configuration
πŸ’¬ Discuss
βœ… Correct Answer: (C) Retention time or size
Explanation: Messages are retained based on retention time or log size configuration.

Q. Kafka’s distributed architecture allows:

  • (A) Only one broker per cluster
  • (B) Multiple producers but single consumer
  • (C) Horizontal scalability and fault tolerance
  • (D) One topic per broker
πŸ’¬ Discuss
βœ… Correct Answer: (C) Horizontal scalability and fault tolerance
Explanation: Kafka's architecture supports fault tolerance and horizontal scaling by design.

Q. Which of the following best describes Kafka's role in a data pipeline?

  • (A) Data validator
  • (B) Data storage engine
  • (C) Message broker for stream processing
  • (D) Frontend data renderer
πŸ’¬ Discuss
βœ… Correct Answer: (C) Message broker for stream processing
Explanation: Kafka acts as a distributed message broker in real-time data pipelines.

Q. What is the function of a Kafka broker?

  • (A) Consuming messages
  • (B) Storing and distributing messages
  • (C) Managing user authentication
  • (D) Compiling Java code
πŸ’¬ Discuss
βœ… Correct Answer: (B) Storing and distributing messages
Explanation: Kafka brokers store messages and serve consumers and producers.

Q. Kafka achieves fault tolerance through:

  • (A) Checkpoints
  • (B) Backups
  • (C) Replication
  • (D) Mirroring
πŸ’¬ Discuss
βœ… Correct Answer: (C) Replication
Explanation: Kafka replicates partitions across multiple brokers to ensure fault tolerance.