Kafka Common Commands

Source: Internet
Author: User
Tags zookeeper

The following is a summary of Kafka Common command line: 0. See which topics:./kafka-topics.sh--list--zookeeper 192.168.0.201:12181

1. View topic details./kafka-topics.sh-zookeeper 127.0.0.1:2181-describe-topic testKJ12, add a copy for topic. Kafka-reassign-partitions.sh-zookeeper 127.0.0.1:2181-reassignment-json-file Json/partitions-to-move.json- Execute3, creating topic./kafka-topics.sh--create--zookeeper localhost:2181--replication-factor 1--partitions 1--topic testKJ14, add partition./bin/kafka-topics.sh–zookeeper 127.0.0.1:2181–alter–partitions 20–topic testKJ15 for topic, Kafka producer client commands./kafka-console-producer.sh--broker-list localhost:9092--topic testKJ16, Kafka consumer client commands. Kafka-console-consumer.sh-zookeeper localhost:2181--from-beginning--topic testKJ17, Kafka service started. Kafka-server-start.sh-daemon. /config/server.properties 8, downline broker./kafka-run-class.sh kafka.admin.ShutdownBroker--zookeeper 127.0.0.1:2181--broker #brokerId #--num.retries 3--retry.interval.ms 60shutdown broker9, delete topic./kafka-run-class.sh Kafka.admin.DeleteTopicCommand--topic testKJ1--zookeeper 127.0.0.1:2181./kafka-topics.sh--zookeeper localhost : 2181 --delete--topic testKJ110, view offset./kafka-run-class.sh kafka.tools.ConsumerOffsetChecker--zookeeper for consumption within consumer group localhost:2181--group Test--topic testKJ1

Kafka Common Commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.