RocketMQ使用教程相關系列 目錄
#所屬集群名字
brokerClusterName=xuzhu_cluster
##broker名稱,主從要一樣,根據BrokerRole來確定誰是主誰是從
brokerName=broker-a
#0 表示 Master,>0 表示 Slave
brokerId=0
#nameServer 地址,分號分割
namesrvAddr=rocketmq-nameserver1:9876;rocketmq-nameserver2:9876
#在發送訊息時,自動創建服務器不存在的 topic,默認創建的佇列數
defaultTopicQueueNums=4
#是否允許 Broker 自動創建 Topic,建議線下開啟,線上關閉
autoCreateTopicEnable=true
#是否允許 Broker 自動創建訂閱組,建議線下開啟,線上關閉
autoCreateSubscriptionGroup=true
#Broker 對外服務的監聽埠
#brokerIP1 當前broker監聽的IP
brokerIP1=192.168.88.131
#存在broker主從時,在broker主節點上配置了brokerIP2的話,broker從節點會連接主節點配置的#brokerIP2來同步,
brokerIP2=192.168.88.131
listenPort=10911
#洗掉檔案時間點,默認凌晨 4 點
deleteWhen=04
#檔案保留時間,默認 48 小時
fileReservedTime=120
#commitLog 每個檔案的大小默認 1G
mapedFileSizeCommitLog=1073741824
#ConsumeQueue 每個檔案默認存 30W 條,根據業務情況調整
mapedFileSizeConsumeQueue=300000
#destroyMapedFileIntervalForcibly=120000
#redeleteHangedFileInterval=120000
#檢測物理檔案磁盤空間 checkTransactionMessageEnable
diskMaxUsedSpaceRatio=88
#存盤路徑
storePathRootDir=/usr/local/server/mq/rocketmq/store
#commitLog 存盤路徑
storePathCommitLog=/usr/local/server/mq/rocketmq/store/commitlog
#消費佇列存盤路徑存盤路徑
storePathConsumeQueue=/usr/local/server/mq/rocketmq/store/consumequeue
#訊息索引存盤路徑
storePathIndex=/usr/local/server/mq/rocketmq/store/index
#checkpoint 檔案存盤路徑
storeCheckpoint=/usr/local/server/mq/rocketmq/store/checkpoint
#abort 檔案存盤路徑
abortFile=/usr/local/server/mq/rocketmq/store/abort
#限制的訊息大小
maxMessageSize=65536
#flushCommitLogLeastPages=4
#flushConsumeQueueLeastPages=2
#flushCommitLogThoroughInterval=10000
#flushConsumeQueueThoroughInterval=60000
#Broker 的角色
#- ASYNC_MASTER 異步復制 Master
#- SYNC_MASTER 同步雙寫 Master
#- SLAVE
brokerRole=ASYNC_MASTER
#刷盤方式
#- ASYNC_FLUSH 異步刷盤
#- SYNC_FLUSH 同步刷盤
flushDiskType=ASYNC_FLUSH
#checkTransactionMessageEnable=false
#發訊息執行緒池數量
#sendMessageThreadPoolNums=128
#拉訊息執行緒池數量
#pullMessageThreadPoolNums=128
#默認該值為false,表示該Broker不承載系統自定義用于存盤訊息軌跡的topic
traceTopicEnable=false
參考:
RocketMQ中broker配置brokcerIP1和brokerIP2的作用:https://blog.csdn.net/jiajiren11/article/details/80528406
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/280339.html
標籤:其他
