Q. In Kafka, 'compacted topics' are useful for:

  • (A) Storing historical logs
  • (B) Storing the latest state per key
  • (C) Compressing topic names
  • (D) Managing consumer groups
πŸ’¬ Discuss
βœ… Correct Answer: (B) Storing the latest state per key
Explanation: Compacted topics retain the latest message per key and remove older ones.

Q. Kafka guarantees message order in:

  • (A) The entire topic
  • (B) Each partition
  • (C) Across consumer groups
  • (D) Each broker
πŸ’¬ Discuss
βœ… Correct Answer: (B) Each partition
Explanation: Kafka maintains order only within a single partition.

Q. Kafka MirrorMaker is mainly used for:

  • (A) Cloning consumer groups
  • (B) Sending data to databases
  • (C) Replicating Kafka clusters
  • (D) Generating synthetic traffic
πŸ’¬ Discuss
βœ… Correct Answer: (C) Replicating Kafka clusters
Explanation: MirrorMaker replicates messages across Kafka clusters for disaster recovery or geo-redundancy.

Q. What is the effect of increasing the number of Kafka partitions?

  • (A) Reduces availability
  • (B) Improves parallelism and scalability
  • (C) Slows message delivery
  • (D) Reduces disk usage
πŸ’¬ Discuss
βœ… Correct Answer: (B) Improves parallelism and scalability
Explanation: More partitions allow parallel reads/writes and improve scalability.

Q. Kafka retention policy can be based on:

  • (A) Consumer speed
  • (B) Message value
  • (C) Time or size
  • (D) Producer group
πŸ’¬ Discuss
βœ… Correct Answer: (C) Time or size
Explanation: Kafka supports retention policies based on time (ms) or log size (bytes).

Q. Which Kafka feature provides strong message delivery guarantees?

  • (A) Consumers with high polling rate
  • (B) Producers with retries=0
  • (C) Idempotent producers and transactions
  • (D) ZooKeeper acknowledgments
πŸ’¬ Discuss
βœ… Correct Answer: (C) Idempotent producers and transactions
Explanation: Idempotent producers and transactions ensure exactly-once delivery semantics.

Q. Kafka offsets are stored by default in:

  • (A) ZooKeeper
  • (B) Kafka internal topic
  • (C) Consumer files
  • (D) Producer logs
πŸ’¬ Discuss
βœ… Correct Answer: (B) Kafka internal topic
Explanation: Kafka stores offsets in the internal topic __consumer_offsets.

Q. Kafka broker configuration file is named:

  • (A) broker.json
  • (B) server.xml
  • (C) server.properties
  • (D) broker-config.yaml
πŸ’¬ Discuss
βœ… Correct Answer: (C) server.properties
Explanation: server.properties is the main configuration file for Kafka brokers.

Q. Kafka Connect uses which type of connectors?

  • (A) Data wires
  • (B) Input/output streams
  • (C) Source and Sink connectors
  • (D) Client-server bridges
πŸ’¬ Discuss
βœ… Correct Answer: (C) Source and Sink connectors
Explanation: Kafka Connect uses source connectors to ingest and sink connectors to export data.