0
0
Kafkadevops~5 mins

Kafka CLI tools overview - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
Akafka-console-producer.sh
Bkafka-topics.sh
Ckafka-consumer-groups.sh
Dkafka-configs.sh
What does the kafka-console-consumer.sh tool do?
AReads messages from a topic
BSends messages to a topic
CManages consumer groups
DConfigures broker settings
Which option is required to specify the Kafka broker address in CLI commands?
A--topic
B--group
C--partitions
D--bootstrap-server
To check the status of consumer groups, which CLI tool should you use?
Akafka-consumer-groups.sh
Bkafka-topics.sh
Ckafka-console-producer.sh
Dkafka-run-class.sh
Which Kafka CLI tool allows you to send messages to a topic?
Akafka-topics.sh
Bkafka-console-consumer.sh
Ckafka-console-producer.sh
Dkafka-acls.sh
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.