Kafka常用命令
# 启动zookeeper
nohup bin/zookeeper-server-start.sh config/zookeeper.properties &
# 启动server
nohup bin/kafka-server-start.sh sonfig/server.properties &
# 查看topic
bin/kafka-topics.sh-list--zookeeper localhost2181
# 创建个topic
bin/kafka-topics.sh--create--zookeeper localhost2181--replication-factor 1--partitions 1-topic
test
# 发送数据
bin/kafka-console-producer.sh--broker-list localhost9092--topic test
# 消费数据
bin/kafka-console-consumer.sh--bootstrap-server locallost:9092-topic test-from-beginning