帮助信息:./kafka-topic.sh --help
- --alter
- --bootstrap-server <String: server to connect to>
- --command-config <String: command config property file>
- --config <String: name=value>
- --create
- --delete
- --delete-config <Strign: name>
- --describe
- --disable-rack-awre
- --exclude-interval
- --force
- --if-exists
- --if-not-exists
- --list
- --partitions <Integer :of partitions>
- --replica-assignment
- --replication-factor <Integer: replication factor>
- --topic <String:topic>
- --topics-with-overrides
- --unavailable-partitions
- --under-replicated-partitions
- --zookeeper <String: hosts >
常用:
./bin/kafka-topics.sh --create --bootstrap-server node01:9092 --replication-factor 3 --partitions 10 --topic topic_5
./bin/kafka-topics.sh --bootstrap-server localhost:9092 --topic SP2 --describe