Where are Kafka CLI tools typically found, and how do you get help for a tool?
Kafka CLI tools are typically provided in the Kafka bin directory. You can view usage by running the tool with no arguments or with –help.
What is the main connection option modern Kafka CLI commands use?
Modern Kafka CLI tools typically connect with –bootstrap-server, which points to one or more brokers.
What important CLI migration point should you remember about ZooKeeper?
The –zookeeper option was removed from kafka-topics and kafka-reassign-partitions. Use –bootstrap-server instead.
What naming difference exists between Apache Kafka scripts and Confluent Platform tools?
Apache Kafka docs often show script names like kafka-topics.sh, while Confluent Platform often drops the .sh extension for bundled versions.
Which CLI tool starts a Kafka server?
kafka-server-start starts a Kafka server, usually by passing a server properties file.
Which CLI tool stops a Kafka server?
kafka-server-stop stops a running Kafka server. In newer Kafka versions it can optionally target a broker/controller role or a node ID.
Which CLI tool is used to generate a cluster UUID and format storage in KRaft mode?
kafka-storage is used to generate a cluster ID and format the log directories for a KRaft cluster.
Which CLI tool helps inspect metadata quorum status in KRaft?
kafka-metadata-quorum describes the metadata quorum status and is useful for debugging KRaft clusters.
Which CLI tool is used to create, delete, describe, or alter a topic?
kafka-topics is the main CLI tool for creating, deleting, describing, and changing topics.
What is the simplest command pattern to create a topic?
Use: kafka-topics –create –topic <name> --bootstrap-server <host:port></host:port></name>
What does kafka-topics –describe show?
It shows topic metadata such as partition count, replication factor, leader, replicas, ISR, and configs.
Which tool should you use to modify topic configuration values on an existing topic?
Use kafka-configs for topic configuration changes on existing topics rather than relying on kafka-topics alone.
Which CLI tool updates broker and topic configs?
kafka-configs updates broker configs and topic configs.
Can some Kafka broker or topic configs be changed without restarting brokers?
Yes. Some broker and topic configs are dynamic and can be changed without restarting, depending on their update mode.
Which CLI tool sends plain records to a Kafka topic from the terminal?
kafka-console-producer sends data to Kafka topics from standard input.
How does kafka-console-producer treat terminal input by default?
By default, each line entered in the console producer becomes a separate Kafka record.
Which CLI tool reads records from a topic and prints them to standard output?
kafka-console-consumer reads data from Kafka topics and writes it to STDOUT.
What does –from-beginning do in kafka-console-consumer?
It makes the console consumer read available records from the beginning of the topic instead of only new incoming records.
Which option is used to pass client properties to a console producer, and which one for a console consumer?
Use –producer.config with kafka-console-producer and –consumer.config with kafka-console-consumer.
How do you connect console producer/consumer to an SSL-secured cluster?
Put SSL properties in a client properties file and pass that file with –producer.config or –consumer.config.
What extra pattern is commonly needed when using Kafka CLI tools with Confluent Cloud?
You typically provide both –bootstrap-server and a config file containing the required client authentication settings.
Which CLI tool is used to inspect consumer groups and lag?
kafka-consumer-groups lists, describes, and can delete consumer groups, and it shows current offsets and lag.
What does kafka-consumer-groups –describe –group <group> show?</group>
It shows per-partition details such as current offset, log-end offset, lag, consumer ID, host, and client ID.
What does kafka-consumer-groups –list do?
It lists consumer groups in the cluster.