Q. Kafka uses which mechanism to ensure high throughput?

  • (A) Polling
  • (B) Batching and zero-copy
  • (C) Push model
  • (D) Asynchronous email
πŸ’¬ Discuss
βœ… Correct Answer: (B) Batching and zero-copy
Explanation: Kafka uses batching and zero-copy transfer for efficient data handling.

Q. Which property enables idempotent Kafka producers?

  • (A) enable.idempotence=true
  • (B) acks=all
  • (C) batch.idempotence=true
  • (D) message.retries=0
πŸ’¬ Discuss
βœ… Correct Answer: (A) enable.idempotence=true
Explanation: Setting enable.idempotence=true ensures the producer won’t send duplicate messages.

Q. Kafka’s 'log compaction' feature allows:

  • (A) Permanent deletion of logs
  • (B) Retention of the latest value for each key
  • (C) Encrypted log storage
  • (D) Balanced load distribution
πŸ’¬ Discuss
βœ… Correct Answer: (B) Retention of the latest value for each key
Explanation: Log compaction keeps only the latest message for each key.

Q. What is a Kafka offset?

  • (A) Unique ID of a topic
  • (B) Key-value separator
  • (C) Position of a message in a partition
  • (D) Partition leader ID
πŸ’¬ Discuss
βœ… Correct Answer: (C) Position of a message in a partition
Explanation: Offset is the position of a message in a Kafka partition.

Q. Kafka cluster metadata is updated using:

  • (A) Admin client only
  • (B) Consumer polling
  • (C) Broker heartbeat
  • (D) ZooKeeper or KRaft metadata quorum
πŸ’¬ Discuss
βœ… Correct Answer: (D) ZooKeeper or KRaft metadata quorum
Explanation: ZooKeeper (or KRaft) handles metadata updates in the cluster.

Q. Kafka Connect enables integration with:

  • (A) Web servers
  • (B) Distributed caches
  • (C) External data sources like DBs and files
  • (D) Message queues only
πŸ’¬ Discuss
βœ… Correct Answer: (C) External data sources like DBs and files
Explanation: Kafka Connect provides connectors for external data sources and sinks.

Q. In Kafka, a 'consumer group' allows:

  • (A) Parallel consumption across consumers
  • (B) Multiple producers
  • (C) Faster retention
  • (D) Data encryption
πŸ’¬ Discuss
βœ… Correct Answer: (A) Parallel consumption across consumers
Explanation: Consumers in a group share the workload of reading from a topic’s partitions.

Q. Kafka topics are identified by:

  • (A) Numeric ID
  • (B) Topic name string
  • (C) Partition ID
  • (D) Message key
πŸ’¬ Discuss
βœ… Correct Answer: (B) Topic name string
Explanation: Each Kafka topic has a unique name used to reference it.

Q. Kafka is highly scalable due to:

  • (A) Monolithic architecture
  • (B) File-based storage
  • (C) Partitioned and distributed log structure
  • (D) Centralized processing
πŸ’¬ Discuss
βœ… Correct Answer: (C) Partitioned and distributed log structure
Explanation: Kafka scales well because it distributes topics into partitions across brokers.

Q. Which component assigns partitions to consumers?

  • (A) Kafka producer
  • (B) Kafka broker
  • (C) Consumer group coordinator
  • (D) Kafka Connect
πŸ’¬ Discuss
βœ… Correct Answer: (C) Consumer group coordinator
Explanation: The consumer group coordinator assigns partitions to consumers in a group.