Recall & Review
beginner
What is the primary purpose of Kafka CLI tools?
Kafka CLI tools help users interact with Kafka clusters by managing topics, producers, consumers, and cluster metadata through command-line commands.
Click to reveal answer
beginner
Name three common Kafka CLI tools and their main functions.
- kafka-topics.sh: Manage topics (create, delete, list).
- kafka-console-producer.sh: Send messages to a topic.
- kafka-console-consumer.sh: Read messages from a topic.
Click to reveal answer
beginner
How do you list all topics in a Kafka cluster using CLI?
Use the command:
kafka-topics.sh --list --bootstrap-server <broker_address> to see all topics.Click to reveal answer
intermediate
What is the role of
kafka-consumer-groups.sh tool?It manages consumer groups, allowing you to view group details, reset offsets, and monitor consumer lag.
Click to reveal answer
beginner
Why is it important to specify
--bootstrap-server in Kafka CLI commands?The
--bootstrap-server option tells the CLI which Kafka broker to connect to initially, so it can discover the full cluster and perform operations.Click to reveal answer
Which Kafka CLI tool is used to create or delete topics?
✗ Incorrect
The kafka-topics.sh tool manages topics, including creating and deleting them.
What does the kafka-console-consumer.sh tool do?
✗ Incorrect
kafka-console-consumer.sh reads messages from a Kafka topic and displays them in the console.
Which option is required to specify the Kafka broker address in CLI commands?
✗ Incorrect
The --bootstrap-server option specifies the Kafka broker address to connect to.
To check the status of consumer groups, which CLI tool should you use?
✗ Incorrect
kafka-consumer-groups.sh is used to manage and monitor consumer groups.
Which Kafka CLI tool allows you to send messages to a topic?
✗ Incorrect
kafka-console-producer.sh sends messages to a Kafka topic from the command line.
Explain the main functions of Kafka CLI tools and why they are useful.
Think about how you would control Kafka from the command line.
You got /4 concepts.
Describe how you would list all topics and send a message to a topic using Kafka CLI tools.
Focus on the commands and options needed.
You got /3 concepts.