kafka建立datain节点
前提:zookeeper和kafka已开启
- zookeeper下建立节点
zkCli.sh
ls /
create /datain 1 create /datain/id 1
- kafka的bin目录下,建topic
kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic datain
kafka-topics.sh --list --zookeeper localhost:2181 //查看所有topic