kafka 操作
-
启动
cd /usr/local/Cellar/kafka/2.3.1/libexec
bin/zookeeper-server-start.sh config/zookeeper.properties
cd /usr/local/Cellar/kafka/2.3.1/libexec
bin/kafka-server-start.sh config/server.properties -
查看topic
bin/kafka-topics.sh --list --bootstrap-server localhost:9092 -
新建topic
cd /usr/local/Cellar/kafka/2.3.1/libexec
bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 12 --topic test-topic -
删除topic
bin/kafka-topics.sh --delete --bootstrap-server localhost:9092 --topic test-topic