Q. Kafka consumers poll messages using:

  • (A) Push-based model
  • (B) Webhook callbacks
  • (C) Pull-based model
  • (D) ZooKeeper triggers
πŸ’¬ Discuss
βœ… Correct Answer: (C) Pull-based model
Explanation: Kafka consumers use a pull-based model to fetch data from brokers.

Q. Kafka retention settings are configured:

  • (A) Per consumer group
  • (B) Per partition
  • (C) Globally per cluster
  • (D) Per topic
πŸ’¬ Discuss
βœ… Correct Answer: (D) Per topic
Explanation: Kafka retention settings can be customized on a per-topic basis.

Q. Kafka handles schema evolution best with:

  • (A) Raw text messages
  • (B) Protobuf with brokers
  • (C) Avro with Schema Registry
  • (D) XML validation
πŸ’¬ Discuss
βœ… Correct Answer: (C) Avro with Schema Registry
Explanation: Avro with Schema Registry enables compatibility across schema versions in Kafka.

Q. Kafka guarantees message delivery under which setting?

  • (A) Replication.factor=0
  • (B) acks=all
  • (C) acks=0
  • (D) acks=1
πŸ’¬ Discuss
βœ… Correct Answer: (B) acks=all
Explanation: 'acks=all' ensures that the message is acknowledged only after all replicas receive it.

Q. Kafka Streams state stores are used to:

  • (A) Store HTML pages
  • (B) Persist the state of stream transformations
  • (C) Track offsets
  • (D) Save logs from brokers
πŸ’¬ Discuss
βœ… Correct Answer: (B) Persist the state of stream transformations
Explanation: State stores in Kafka Streams hold local data used in aggregations or joins.

Q. In Kafka, messages are appended to a partition in:

  • (A) No specific order
  • (B) Reverse order
  • (C) Strict sequential order
  • (D) Random order
πŸ’¬ Discuss
βœ… Correct Answer: (C) Strict sequential order
Explanation: Kafka appends messages in strict order to each partition to ensure ordering guarantees.

Q. What is the purpose of Kafka's ISR (In-Sync Replicas)?

  • (A) To cache consumer offsets
  • (B) To track active producers
  • (C) To track replicas that are up-to-date with the leader
  • (D) To store schema versions
πŸ’¬ Discuss
βœ… Correct Answer: (C) To track replicas that are up-to-date with the leader
Explanation: ISR is a set of replicas that are fully caught up with the leader.

Q. What happens if all replicas of a partition go out of sync?

  • (A) Producer retries message
  • (B) Partition is rebalanced
  • (C) Broker shuts down
  • (D) Data may be lost or unavailable
πŸ’¬ Discuss
βœ… Correct Answer: (D) Data may be lost or unavailable
Explanation: Kafka cannot guarantee availability or durability if all replicas go out of sync.

Q. Kafka uses what data structure to store messages in a partition?

  • (A) Circular buffer
  • (B) Linked list
  • (C) Append-only log
  • (D) Stack
πŸ’¬ Discuss
βœ… Correct Answer: (C) Append-only log
Explanation: Kafka partitions are implemented as append-only logs.

Q. Kafka consumer group ensures that:

  • (A) All consumers read all partitions
  • (B) Each message is consumed by only one consumer within the group
  • (C) Consumers never share topics
  • (D) Only one partition is used
πŸ’¬ Discuss
βœ… Correct Answer: (B) Each message is consumed by only one consumer within the group
Explanation: Within a consumer group, each partition is assigned to only one consumer.