开启zookeeper
<style></style>bin/zookeeper-server-start.sh -daemon config/zookeeper.properties
查看jps进程
<style></style>jps
启动kafka
<style></style>bin/kafka-server-start.sh config/server.properties
创建topic
<style></style>bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic fly_ad_test
查看topic list列表
<style></style>bin/kafka-topics.sh --list --zookeeper localhost:2181
启动producer
<style></style>bin/kafka-console-producer.sh --broker-list localhost:9092 --topic fly_ad_test
启动consumer
<style></style>bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic fly_ad_test --from-beginning
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。