Q. What type of storage does Kafka use to persist data?

  • (A) RAM
  • (B) MySQL database
  • (C) Log files on disk
  • (D) Cloud storage
πŸ’¬ Discuss
βœ… Correct Answer: (C) Log files on disk
Explanation: Kafka stores messages as append-only logs in disk files.

Q. Which property controls the maximum number of records returned in one poll?

  • (A) max.poll.records
  • (B) max.partition.fetch.bytes
  • (C) batch.size
  • (D) fetch.min.bytes
πŸ’¬ Discuss
βœ… Correct Answer: (A) max.poll.records
Explanation: The 'max.poll.records' setting controls how many messages are returned in a poll.

Q. How does Kafka handle backpressure?

  • (A) By slowing down producers
  • (B) By buffering messages in memory
  • (C) By using message compression
  • (D) By rejecting new producers
πŸ’¬ Discuss
βœ… Correct Answer: (B) By buffering messages in memory
Explanation: Kafka handles backpressure by buffering messages before consumers process them.

Q. Kafka messages are assigned which type of identifier?

  • (A) UUID
  • (B) Offset
  • (C) Index
  • (D) Label
πŸ’¬ Discuss
βœ… Correct Answer: (B) Offset
Explanation: Each message in Kafka is assigned a unique offset within its partition.

Q. What happens if Kafka’s disk becomes full?

  • (A) Messages are stored in memory
  • (B) Kafka stops accepting new messages
  • (C) Old messages are deleted immediately
  • (D) Consumers are blocked
πŸ’¬ Discuss
βœ… Correct Answer: (B) Kafka stops accepting new messages
Explanation: Kafka will stop accepting new messages if disk space runs out.

Q. How does Kafka scale horizontally?

  • (A) By increasing consumer buffer size
  • (B) By adding more partitions and brokers
  • (C) By upgrading JVM
  • (D) By compressing log files
πŸ’¬ Discuss
βœ… Correct Answer: (B) By adding more partitions and brokers
Explanation: Kafka scales horizontally by increasing the number of partitions and brokers.

Q. Kafka topic replication improves:

  • (A) Data redundancy and fault tolerance
  • (B) Producer speed
  • (C) Consumer load
  • (D) ZooKeeper performance
πŸ’¬ Discuss
βœ… Correct Answer: (A) Data redundancy and fault tolerance
Explanation: Replication ensures that even if a broker fails, data is not lost.

Q. Kafka can be used as a replacement for:

  • (A) File system
  • (B) Database
  • (C) Message queue system
  • (D) FTP server
πŸ’¬ Discuss
βœ… Correct Answer: (C) Message queue system
Explanation: Kafka is designed as a high-throughput message queue system.

Q. Which command lists all available Kafka topics?

  • (A) kafka-run-class.sh
  • (B) kafka-topics.sh --list
  • (C) kafka-console-consumer.sh --describe
  • (D) kafka-log-dirs.sh --status
πŸ’¬ Discuss
βœ… Correct Answer: (B) kafka-topics.sh --list
Explanation: 'kafka-topics.sh --list' shows all current topics in the Kafka cluster.

Q. Kafka’s primary design goal is:

  • (A) Low latency and file compression
  • (B) High throughput and fault tolerance
  • (C) Database indexing
  • (D) Static content serving
πŸ’¬ Discuss
βœ… Correct Answer: (B) High throughput and fault tolerance
Explanation: Kafka was built to handle large volumes of data with high throughput and reliability.