Q. Kafka topics can be configured with:

  • (A) Queue settings
  • (B) Schema definitions
  • (C) Retention, partition, and replication settings
  • (D) Web server rules
πŸ’¬ Discuss
βœ… Correct Answer: (C) Retention, partition, and replication settings
Explanation: Topics can be configured with settings for retention, partition count, and replication factor.

Q. What is the use of 'acks=1' in Kafka producer?

  • (A) No acknowledgment required
  • (B) Acknowledgment from all replicas
  • (C) Acknowledgment from leader only
  • (D) Acknowledgment from consumer
πŸ’¬ Discuss
βœ… Correct Answer: (C) Acknowledgment from leader only
Explanation: With acks=1, the producer waits for the leader to acknowledge the write.

Q. Kafka can be described as:

  • (A) Real-time data platform
  • (B) Document database
  • (C) Push-based API server
  • (D) Command-line interface tool
πŸ’¬ Discuss
βœ… Correct Answer: (A) Real-time data platform
Explanation: Kafka is used as a real-time data pipeline and streaming platform.

Q. Which Kafka feature supports exactly-once processing?

  • (A) Compression
  • (B) Transactions and idempotent producers
  • (C) ISR sync
  • (D) Consumer auto commit
πŸ’¬ Discuss
βœ… Correct Answer: (B) Transactions and idempotent producers
Explanation: Transactions and idempotence enable Kafka to guarantee exactly-once semantics.

Q. Which of the following is true about Kafka consumers?

  • (A) They push data to producers
  • (B) They are assigned partitions manually only
  • (C) They pull data from brokers
  • (D) They store data permanently
πŸ’¬ Discuss
βœ… Correct Answer: (C) They pull data from brokers
Explanation: Kafka consumers pull data from partitions in Kafka brokers.

Q. Kafka cluster scaling is primarily achieved by:

  • (A) Adding more producers
  • (B) Using more threads
  • (C) Adding more partitions and brokers
  • (D) Deleting old topics
πŸ’¬ Discuss
βœ… Correct Answer: (C) Adding more partitions and brokers
Explanation: Kafka scales by increasing the number of partitions and brokers.

Q. What happens when a consumer group has more consumers than partitions?

  • (A) Messages are lost
  • (B) Some consumers stay idle
  • (C) Partitions get deleted
  • (D) Offsets are reset
πŸ’¬ Discuss
βœ… Correct Answer: (B) Some consumers stay idle
Explanation: Only one consumer can read from a partition, so extra consumers remain idle.

Q. Kafka uses what strategy for distributing partitions to consumers?

  • (A) Random strategy
  • (B) Manual script
  • (C) Partition assignment algorithms
  • (D) Priority queues
πŸ’¬ Discuss
βœ… Correct Answer: (C) Partition assignment algorithms
Explanation: Kafka uses partition assignment strategies like range and round-robin.

Q. Which API in Kafka is used for writing messages?

  • (A) Consumer API
  • (B) Streams API
  • (C) Producer API
  • (D) Admin API
πŸ’¬ Discuss
βœ… Correct Answer: (C) Producer API
Explanation: The Producer API allows applications to send messages to Kafka topics.

Q. Kafka Connect is suitable for:

  • (A) Stream encryption
  • (B) Monitoring latency
  • (C) Ingesting and exporting data with external systems
  • (D) Message compression
πŸ’¬ Discuss
βœ… Correct Answer: (C) Ingesting and exporting data with external systems
Explanation: Kafka Connect integrates Kafka with external data sources and sinks.