Docs
ukafka
Development Guide
Command Line Tools

Command Line Tools

Download Apache Kafka Binary Package

  1. Download the kafka_2.13-2.6.1.tgz binary package.

  2. Decompress

    tar -xzvf kafka_2.13-2.6.1.tgz
  3. Enter the command line directory

    cd kafka_2.13-2.6.1/bin

Basic Operations

  1. Please first create a Topic: test-topic on the console, refer to: Topic Creation
  2. In actual execution, please replace the following address with the access address of your UKafka cluster, refer to: View Access Point.
  • Topic List
./kafka-topics.sh --bootstrap-server 10.9.188.159:9092 --list
  • View Topic Details
./kafka-topics.sh --bootstrap-server 10.9.188.159:9092 --describe --topic test-topic
  • Send Message
./kafka-console-producer.sh --bootstrap-server 10.9.188.159:9092 --topic test-topic
  • Receive Message
./kafka-console-consumer.sh --bootstrap-server 10.9.188.159:9092 --topic test-topic --group test-group --from-beginning
  • Consumer Group List

Do not exit the receive message command, open another terminal and execute the following command

./kafka-consumer-groups.sh --bootstrap-server 10.9.188.159:9092 --list
  • Consumer Group Details
./kafka-consumer-groups.sh --bootstrap-server 10.9.188.159:9092 --describe --group test-group
  • Delete Consumer Group
./kafka-consumer-groups.sh --bootstrap-server 10.9.188.159:9092 --delete --group test-group