Q. What is the default delivery guarantee of Kafka?

  • (A) At-most-once
  • (B) At-least-once
  • (C) Exactly-once
  • (D) Once-in-a-while
πŸ’¬ Discuss
βœ… Correct Answer: (B) At-least-once
Explanation: Kafka provides at-least-once delivery semantics by default.

Q. Kafka can achieve exactly-once semantics using:

  • (A) Manual offset commit
  • (B) Kafka Connect only
  • (C) Idempotent producers and transactions
  • (D) Kafka Admin tools
πŸ’¬ Discuss
βœ… Correct Answer: (C) Idempotent producers and transactions
Explanation: Exactly-once delivery is possible with idempotent producers and Kafka transactions.

Q. Kafka partitions are assigned to consumers using:

  • (A) Kafka MirrorMaker
  • (B) ZooKeeper
  • (C) Consumer group coordinator
  • (D) Kafka Streams
πŸ’¬ Discuss
βœ… Correct Answer: (C) Consumer group coordinator
Explanation: The group coordinator manages partition assignment among consumers.

Q. To configure replication in Kafka, you set:

  • (A) replication.factor
  • (B) partition.size
  • (C) broker.id
  • (D) message.delay.ms
πŸ’¬ Discuss
βœ… Correct Answer: (A) replication.factor
Explanation: The 'replication.factor' setting controls how many replicas each partition has.

Q. Kafka’s log compaction ensures:

  • (A) Faster offset lookup
  • (B) Only latest value per key is kept
  • (C) Oldest messages are prioritized
  • (D) Higher throughput
πŸ’¬ Discuss
βœ… Correct Answer: (B) Only latest value per key is kept
Explanation: Log compaction removes older messages with the same key, keeping only the latest.

Q. Kafka’s throughput can be increased by:

  • (A) Reducing partitions
  • (B) Using more brokers and partitions
  • (C) Disabling retention
  • (D) Removing replication
πŸ’¬ Discuss
βœ… Correct Answer: (B) Using more brokers and partitions
Explanation: More brokers and partitions allow Kafka to scale horizontally and handle more data.

Q. What is the role of the Kafka offset?

  • (A) It tracks broker memory usage
  • (B) It identifies the latest topic in a broker
  • (C) It marks the position of a consumer in a partition
  • (D) It determines replication lag
πŸ’¬ Discuss
βœ… Correct Answer: (C) It marks the position of a consumer in a partition
Explanation: Kafka uses offsets to track the position of each consumer within a partition.

Q. How does Kafka achieve horizontal scalability?

  • (A) Using virtual machines
  • (B) By adding more consumers
  • (C) By increasing partition and broker count
  • (D) By enabling SSL
πŸ’¬ Discuss
βœ… Correct Answer: (C) By increasing partition and broker count
Explanation: Kafka scales horizontally by allowing more brokers and partitions.

Q. Kafka can handle high throughput due to:

  • (A) Java implementation
  • (B) Memory caching
  • (C) Zero-copy mechanism
  • (D) Consumer groups
πŸ’¬ Discuss
βœ… Correct Answer: (C) Zero-copy mechanism
Explanation: Kafka uses zero-copy to efficiently transfer data from disk to network.

Q. Which configuration controls how frequently Kafka deletes old data?

  • (A) log.retention.ms
  • (B) offset.cleanup.enable
  • (C) partition.delete.interval
  • (D) replication.delete.ms
πŸ’¬ Discuss
βœ… Correct Answer: (A) log.retention.ms
Explanation: Kafka's 'log.retention.ms' config defines how long data is retained.