1.指令
[root@hadoop101 kafka_2.11-2.4.0]# bin/kafka-topics.sh --zookeeper hadoop102:2181 --create --replication-factor 2 --partitions 10 --topic course_learn
2.参数解读
kafka-topics.sh:kafka自带主题相关操作shell脚本
–zookeeper hadoop102:2181/kafka_2.4:指明zookeeper主机端口
–create:创建主题指令
–replication-factor 2:指定2个副本
–partitions 10:指定10个分区
–topic course_learn:指定主题名字为course_learn