Proper installation of Apache Kafka and the use of its command-line interface (CLI) tools are foundational skills for developers and administrators. This section covers critical knowledge of how Kafka is installed (both manually and via tools like Docker), how its directories are structured, and how to use Kafka’s core CLI tools like kafka-topics.sh, kafka-console-producer.sh, and kafka-console-consumer.sh.
These multiple-choice questions (MCQs) on Kafka installation and CLI utilities are useful for interview preparation and will solidify your confidence in running and managing Kafka clusters effectively.
1.) What is the minimum Java version required to run Apache Kafka (as of version 3.0)?
2.) Which file in the Kafka directory is used to start a Kafka broker?
3.) To start Zookeeper using Kafka binaries, which command is used?
4.) What is the default port for Kafka broker?
5.) What is the default port for Zookeeper?
6.) Which configuration file is used to start a Kafka broker?
7.) What command is used to create a new topic in Kafka?
8.) Which tool is used to produce messages to a topic?
9.) What does the kafka-console-consumer.sh tool do?
10.) To list all Kafka topics, which command is used?