Q. What is Apache Kafka primarily used for?

  • (A) Relational database storage
  • (B) Web development
  • (C) Distributed event streaming
  • (D) Static file hosting
πŸ’¬ Discuss
βœ… Correct Answer: (C) Distributed event streaming
Explanation: Kafka is used for building real-time data pipelines and streaming apps by handling distributed event streaming.

Q. In Kafka, what is a 'topic'?

  • (A) A message sent by a producer
  • (B) A category or feed name to which messages are published
  • (C) A type of broker
  • (D) A Kafka client
πŸ’¬ Discuss
βœ… Correct Answer: (B) A category or feed name to which messages are published
Explanation: A topic in Kafka is a logical channel to which producers publish and from which consumers read messages.

Q. What is the role of a Kafka broker?

  • (A) To consume messages from topics
  • (B) To produce messages
  • (C) To store and serve Kafka topics and partitions
  • (D) To encrypt messages
πŸ’¬ Discuss
βœ… Correct Answer: (C) To store and serve Kafka topics and partitions
Explanation: A Kafka broker receives messages from producers, stores them on disk, and serves consumers.

Q. Which component of Kafka is responsible for maintaining offset information?

  • (A) Producer
  • (B) Broker
  • (C) Consumer group
  • (D) ZooKeeper
πŸ’¬ Discuss
βœ… Correct Answer: (C) Consumer group
Explanation: Consumer groups manage offsets to track which messages have been consumed.

Q. What does 'partition' in Kafka help achieve?

  • (A) Security and encryption
  • (B) Message formatting
  • (C) Parallelism and scalability
  • (D) Message persistence
πŸ’¬ Discuss
βœ… Correct Answer: (C) Parallelism and scalability
Explanation: Partitions allow Kafka to scale horizontally and enable parallel processing of data.

Q. Kafka messages are always stored in the order they are received in a:

  • (A) Broker
  • (B) Topic
  • (C) Consumer group
  • (D) Partition
πŸ’¬ Discuss
βœ… Correct Answer: (D) Partition
Explanation: Within a partition, Kafka guarantees ordering of messages.

Q. Which of the following is NOT a Kafka component?

  • (A) Broker
  • (B) Topic
  • (C) Stream
  • (D) Document
πŸ’¬ Discuss
βœ… Correct Answer: (D) Document
Explanation: Document is not a Kafka component. Broker, topic, and stream are core concepts in Kafka.

Q. What happens when a Kafka consumer fails?

  • (A) Kafka deletes its messages
  • (B) Another consumer in the group takes over the partition
  • (C) Kafka restarts automatically
  • (D) All partitions are paused
πŸ’¬ Discuss
βœ… Correct Answer: (B) Another consumer in the group takes over the partition
Explanation: Kafka provides fault tolerance by allowing another consumer in the same group to take over the partition.

Q. Kafka is written in which programming language?

  • (A) Java and Scala
  • (B) Python
  • (C) C++
  • (D) Go
πŸ’¬ Discuss
βœ… Correct Answer: (A) Java and Scala
Explanation: Kafka is developed using Java and Scala languages.

Q. Which tool is commonly used to monitor and manage Kafka clusters?

  • (A) Grafana
  • (B) Kafka Manager
  • (C) ZooKeeper
  • (D) Hadoop UI
πŸ’¬ Discuss
βœ… Correct Answer: (B) Kafka Manager
Explanation: Kafka Manager is a popular tool used for managing and monitoring Kafka clusters.