當(dāng)前位置:
首頁 >
mac安装Kafka启动 模拟生产者消费者
發(fā)布時(shí)間:2024/3/26
49
豆豆
生活随笔
收集整理的這篇文章主要介紹了
mac安装Kafka启动 模拟生产者消费者
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
安裝kafka
brew install kafka啟動(dòng)Kafka
brew services start zookeeper brew services start kafka如果不懂 可以查看以下命令
kafka-topics --help創(chuàng)建一個(gè)topic
kafka-topics --create --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1 --topic test查看topic
kafka-topics --list --bootstrap-server localhost:9092新開一個(gè)窗口 建立生產(chǎn)者
kafka-console-producer --bootstrap-server localhost:9092 --topic test新開一個(gè)窗口 建立消費(fèi)者
kafka-console-consumer --bootstrap-server localhost:9092 --topic test[
總結(jié)
以上是生活随笔為你收集整理的mac安装Kafka启动 模拟生产者消费者的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 运营商是否限制4G网速?联通表示只会提速
- 下一篇: 工程图学及计算机绘图非机类答案,工程图学