您好,登錄后才能下訂單哦!
分布式消息服務(wù)器kafka
##搭建過程:
步驟:
1:下載代碼,解壓
2:啟動zookeeper服務(wù)器:bin/zookeeper-server-start.sh config/zookeeper.properties
3:啟動kafka服務(wù)器:bin/kafka-server-start.sh config/server.properties
4:創(chuàng)建一個(gè)topic:bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic mytopic
查看是否創(chuàng)建成功:bin/kafka-topics.sh --list --zookeeper localhost:2181
5:發(fā)送消息:bin/kafka-console-producer.sh --broker-list localhost:9092 --topic mytopic
6:啟動一個(gè)消費(fèi)者:bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic mytopic --from-begining
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。