溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

簡易kafka消息服務(wù)器搭建

發(fā)布時(shí)間:2020-06-25 06:10:12 來源:網(wǎng)絡(luò) 閱讀:220 作者:棲木之地 欄目:大數(shù)據(jù)

分布式消息服務(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

向AI問一下細(xì)節(jié)

免責(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)容。

AI