rocketmq預設配置和解釋(詳細版)
rocketmq預設配置 - zbjice - 部落格園
https://www.cnblogs.com/jice/p/11981107.html
NameServer配置屬性 | |||
參數名 | 參數類型 | 描述 | 預設參數(時間為機關ms,資料機關為byte) |
rocketmqHome | String | RockerMQ主目錄,預設使用者主目錄 | |
namesrvAddr | String | NameServer位址 | |
kvConfigPath | String | kv配置檔案路徑,包含順序消息主題的配置資訊 | |
configStorePath | String | NameServer配置檔案路徑,建議使用-c指定NameServer配置檔案路徑 | |
clusterTest | boolean | 是否開啟叢集測試,預設為false | |
orderMessageEnable | boolean | 是否支援順序消息,預設為false | |
NameServer、Broker、filter網絡配置屬性 | |||
accessMessageInMemoryMaxRatio | int | 通路消息在記憶體中比率,預設為40 | 40 |
adminBrokerThreadPoolNums | int | 服務端處理控制台管理指令線程池線程數量 | 16 |
autoCreateSubscriptionGroup | boolean | 是否自動建立消費組 | true |
autoCreateTopicEnable | boolean | 是否自動建立主題 | true |
bitMapLengthConsumeQueueExt | int | ConsumeQueue擴充過濾bitmap大小 | 112 |
brokerClusterName | String | Broker叢集名稱 | TestCluster |
brokerFastFailureEnable | boolean | 是否支援broker快速失敗 如果為true表示會立即清除發送消息線程池,消息拉取線程池中排隊任務 ,直接傳回系統錯誤 | true |
brokerId | int | brokerID 0表示主節點 大于0表示從節點 | |
brokerIP1 | String | Broker服務位址 | |
brokerIP2 | String | BrokerHAIP位址,供slave同步消息的位址 | |
brokerName | String | Broker伺服器名稱morning伺服器hostname | broker-a |
brokerPermission | int | Broker權限 預設為6表示可讀可寫 | 6 |
brokerRole | enum | broker角色,分為 ASYNC_MASTER SYNC_MASTER, SLAVE | ASYNC_MASTER |
brokerTopicEnable | boolean | broker名稱是否可以用做主體使用 | true |
channelNotActiveInterval | long | 60000 | |
checkCRCOnRecover | boolean | 檔案恢複時是否校驗CRC | true |
cleanFileForciblyEnable | boolean | 是否支援強行删除過期檔案 | true |
cleanResourceInterval | int | 清除過期檔案線程排程頻率 | 10000 |
clientAsyncSemaphoreValue | int | 65535 | |
clientCallbackExecutorThreads | int | 8 | |
clientChannelMaxIdleTimeSeconds | int | 120 | |
clientCloseSocketIfTimeout | boolean | false | |
clientManagerThreadPoolQueueCapacity | int | 用戶端管理線程池任務隊列初始大小 | 1000000 |
clientManageThreadPoolNums | int | 服務端處理用戶端管理(心跳 注冊 取消注冊線程數量) | 32 |
clientOnewaySemaphoreValue | int | 65535 | |
clientPooledByteBufAllocatorEnable | boolean | false | |
clientSocketRcvBufSize | long | 用戶端socket接收緩沖區大小 | 131072 |
clientSocketSndBufSize | long | 用戶端socket發送緩沖區大小 | 131072 |
clientWorkerThreads | int | 4 | |
clusterTopicEnable | boolean | 叢集名稱是否可用在主題使用 | true |
commercialBaseCount | int | 1 | |
commercialBigCount | int | 1 | |
commercialEnable | boolean | true | |
commercialTimerCount | int | 1 | |
commercialTransCount | int | 1 | |
commitCommitLogLeastPages | int | 一次送出至少需要髒頁的數量,預設4頁,針對 commitlog檔案 | 4 |
commitCommitLogThoroughInterval | int | Commitlog兩次送出的最大間隔,如果超過該間隔,将忽略commitCommitLogLeastPages直接送出 | 200 |
commitIntervalCommitLog | int | commitlog送出頻率 | 200 |
compressedRegister | boolean | false | |
connectTimeoutMillis | long | 連結逾時時間 | 3000 |
consumerFallbehindThreshold | long | 消息消費堆積門檻值預設16GB在disableConsumeifConsumeIfConsumerReadSlowly為true時生效 | 17179869184 |
consumerManagerThreadPoolQueueCapacity | int | 消費管理線程池任務隊列大小 | 1000000 |
consumerManageThreadPoolNums | int | 服務端處理消費管理 擷取消費者清單 更新消費者進度查詢消費進度等 | 32 |
debugLockEnable | boolean | 是否支援 PutMessage Lock鎖列印資訊 | false |
defaultQueryMaxNum | int | 查詢消息預設傳回條數,預設為32 | 32 |
defaultTopicQueueNums | int | 主體在一個broker上建立隊列數量 | 8 |
deleteCommitLogFilesInterval | int | 删除commitlog檔案的時間間隔,删除一個檔案後等一下再删除一個檔案 | 100 |
deleteConsumeQueueFilesInterval | int | 删除consumequeue檔案時間間隔 | 100 |
deleteWhen | String | 磁盤檔案空間充足情況下,預設每天什麼時候執行删除過期檔案,預設04表示淩晨4點 | 04 |
destroyMapedFileIntervalForcibly | int | 銷毀MappedFile被拒絕的最大存活時間,預設120s。清除過期檔案線程在初次銷毀mappedfile時,如果該檔案被其他線程引用,引用次數大于0.則設定MappedFile的可用狀态為false,并設定第一次删除時間,下一次清理任務到達時,如果系統時間大于初次删除時間加上本參數,則将ref次數一次減1000,知道引用次數小于0,則釋放實體資源 | 120000 |
disableConsumeIfConsumerReadSlowly | boolean | 如果消費組消息消費堆積是否禁用該消費組繼續消費消息 | false |
diskFallRecorded | boolean | 是否統計磁盤的使用情況,預設為true | true |
diskMaxUsedSpaceRatio | int | commitlog目錄所在分區的最大使用比例,如果commitlog目錄所在的分區使用比例大于該值,則觸發過期檔案删除 | 75 |
duplicationEnable | boolean | 是否允許重複複制,預設為 false | false |
enableCalcFilterBitMap | boolean | 是否開啟比特位映射,這個屬性不太明白 | false |
enableConsumeQueueExt | boolean | 是否啟用ConsumeQueue擴充屬性 | false |
enablePropertyFilter | boolean | 是否支援根據屬性過濾 如果使用基于标準的sql92模式過濾消息則改參數必須設定為true | false |
endTransactionPoolQueueCapacity | int | 處理送出和復原消息線程池線程隊列大小 | 100000 |
endTransactionThreadPoolNums | int | 處理送出和復原消息線程池 | 24 |
expectConsumerNumUseFilter | boolean | 布隆過濾器參數 | 32 |
fastFailIfNoBufferInStorePool | boolean | 從 transientStorepool中擷取 ByteBuffer是否支援快速失敗 | false |
fetchNamesrvAddrByAddressServer | boolean | 是否支援從伺服器擷取nameServer | false |
fileReservedTime | String | 檔案保留時間,預設72小時,表示非目前寫檔案最後一次更新時間加上filereservedtime小與目前時間,該檔案将被清理 | 120 |
filterDataCleanTimeSpan | long | 清除過濾資料的時間間隔 | 86400000 |
filterServerNums | int | broker伺服器過濾伺服器數量 | |
filterSupportRetry | boolean | 消息過濾是否支援重試 | false |
flushCommitLogLeastPages | int | 一次刷盤至少需要髒頁的數量,針對commitlog檔案 | 4 |
flushCommitLogThoroughInterval | int | commitlog兩次刷盤的最大間隔,如果超過該間隔,将fushCommitLogLeastPages要求直接執行刷盤操作 | 10000 |
flushCommitLogTimed | boolean | 表示await方法等待FlushIntervalCommitlog,如果為true表示使用Thread.sleep方法等待 | false |
flushConsumeQueueLeastPages | int | 一次刷盤至少需要髒頁的數量,預設2頁,針對 Consume檔案 | 2 |
flushConsumeQueueThoroughInterval | int | Consume兩次刷盤的最大間隔,如果超過該間隔,将忽略 | 60000 |
flushConsumerOffsetHistoryInterval | int | fushConsumeQueueLeastPages直接刷盤 | 60000 |
flushConsumerOffsetInterval | int | 持久化消息消費進度 consumerOffse.json檔案的頻率ms | 5000 |
flushDelayOffsetInterval | long | 延遲隊列拉取進度刷盤間隔。預設10s | 10000 |
flushDiskType | enum | 刷盤方式,預設為 ASYNC_FLUSH(異步刷盤),可選值SYNC_FLUSH(同步刷盤) | ASYNC_FLUSH |
flushIntervalCommitLog | int | commitlog刷盤頻率 | 500 |
flushIntervalConsumeQueue | int | consumuQueue檔案刷盤頻率 | 1000 |
flushLeastPagesWhenWarmMapedFile | int | 用位元組0填充整個檔案的,每多少頁刷盤一次。預設4096頁,異步刷盤模式生效 | 4096 |
forceRegister | boolean | 是否強制注冊 | true |
haHousekeepingInterval | int | Master與save長連接配接空閑時間,超過該時間将關閉連接配接 | 20000 |
haListenPort | int | Master監聽端口,從伺服器連接配接該端口,預設為10912 | 10912 |
haMasterAddress | String | Master伺服器IP位址與端口号 | |
haSendHeartbeatInterval | int | Master與Slave心跳包發送間隔 | 5000 |
haSlaveFallbehindMax | int | 允許從伺服器落戶的最大偏移位元組數,預設為256M。超過該值則表示該Slave不可用 | 268435456 |
haTransferBatchSize | int | 一次HA主從同步傳輸的最大位元組長度,預設為32K | 32768 |
heartbeatThreadPoolNums | int | 心跳線程池線程數 | 8 |
heartbeatThreadPoolQueueCapacity | int | 心跳線程隊列數量 | 50000 |
highSpeedMode | boolean | 目前版本未使用 | false |
listenPort | int | 服務端監聽端口 | 10911 |
longPollingEnable | boolean | 是否開啟長輪訓 | true |
mapedFileSizeCommitLog | int | 單個conmmitlog檔案大小預設1GB | 1073741824 |
mapedFileSizeConsumeQueue | int | 單個consumequeue檔案大小預設30W*20表示單個Consumequeue檔案中存儲30W個ConsumeQueue條目 | 6000000 |
mappedFileSizeConsumeQueueExt | int | ConsumeQueue擴充檔案大小預設48MB | 50331648 |
maxDelayTime | int | 目前版本未使用 | 40 |
maxErrorRateOfBloomFilter | int | 布隆過濾器參數 | 20 |
maxHashSlotNum | int | 單個索引檔案hash槽的個數,預設為五百萬 | 5000000 |
maxIndexNum | int | 單個索引檔案索引條目的個數,預設為兩千萬 | 20000000 |
maxMessageSize | int | 預設允許的最大消息體預設4M | 4194304 |
maxMsgsNumBatch | int | 一次查詢消息最大傳回消息條數,預設64條 | 64 |
maxTransferBytesOnMessageInDisk | 一次服務消息端消息拉取,消息在磁盤中傳輸允許的最大位元組 | 65536 | |
maxTransferBytesOnMessageInMemory | int | 一次服務端消息拉取,消息在記憶體中傳輸允許的最大傳輸位元組數預設256kb | 262144 |
maxTransferCountOnMessageInDisk | int | 一次消息服務端消息拉取,消息在磁盤中傳輸允許的最大條數,預設為8條 | 8 |
maxTransferCountOnMessageInMemory | int | 一次服務消息拉取,消息在記憶體中傳輸運作的最大消息條數,預設為32條 | 32 |
messageDelayLevel | String | 延遲隊列等級(s=秒,m=分,h=小時) | 1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h |
messageIndexEnable | boolean | 是否支援消息索引檔案 | true |
messageIndexSafe | boolean | 消息索引是否安全,預設為 false,檔案恢複時選擇檔案檢測點(commitlog.consumeque)的最小的與檔案最後更新對比,如果為true,檔案恢複時選擇檔案檢測點儲存的索引更新時間作為對比 | false |
messageStorePlugIn | String | 消息存儲插件位址預設為空字元串 | |
namesrvAddr | String | nameServer位址 | |
notifyConsumerIdsChangedEnable | 消費者數量變化後是否立即通知RebalenceService線程,以便馬上進行重新負載 | true | |
offsetCheckInSlave | boolean | 從伺服器是否堅持 offset檢測 | false |
osPageCacheBusyTimeOutMills | long | putMessage鎖占用超過該時間,表示 PageCache忙 | 1000 |
pullMessageThreadPoolNums | int | 服務端處理消息拉取線程池線程數量 預設為16加上目前作業系統CPU核數的兩倍 | 32 |
pullThreadPoolQueueCapacity | int | 消息拉去線程池任務隊列初始大小 | 100000 |
putMsgIndexHightWater | int | 目前版本未使用 | 600000 |
queryMessageThreadPoolNums | int | 服務端處理查詢消息線程池數量預設為8加上目前作業系統CPU核數的兩倍 | 16 |
queryThreadPoolQueueCapacity | int | 查詢消息線程池任務隊列初始大小 | 20000 |
redeleteHangedFileInterval | int | 重試删除檔案間隔,配合destorymapedfileintervalforcibly | 120000 |
regionId | String | 消息區域 | DefaultRegion |
registerBrokerTimeoutMills | int | 注冊broker逾時時間 | 6000 |
registerNameServerPeriod | int | broker注冊頻率 大于1分鐘為1分鐘小于10秒為10秒 | 30000 |
rejectTransactionMessage | boolean | 是否拒絕事物消息 | false |
rocketmqHome | String | RocketMQ主目錄 | /home/rocketmq/rocketmq-all-4.3.2-bin-release |
sendMessageThreadPoolNums | int | 服務端處理消息發送線程池數量 | 1 |
sendThreadPoolQueueCapacity | int | 消息發送線程池任務隊列初始大小 | 10000 |
serverAsyncSemaphoreValue | int | 異步消息發送最大并發度 | 64 |
serverCallbackExecutorThreads | int | netty public任務線程池個數,netty網絡設計沒根據業務類型會建立不同線程池毛筆如處理發送消息,消息消費心跳檢測等。如果業務類型(RequestCode)未注冊線程池,則由public線程池執行 | |
serverChannelMaxIdleTimeSeconds | int | 網絡連接配接最大空閑時間。如果連結空閑時間超過此參數設定的值,連接配接将被關閉 | 120 |
serverOnewaySemaphoreValue | int | send oneway消息請求并發度 | 256 |
serverPooledByteBufAllocatorEnable | boolean | ByteBuffer是否開啟緩存 | true |
serverSelectorThreads | int | IO線程池線程個數,主要是NameServer.broker端解析請求,傳回相應的線程個數,這類縣城主要是處理網絡請求的,解析請求包。然後轉發到各個業務線程池完成具體的業務無操作,然後将結果在傳回調用方 | 3 |
serverSocketRcvBufSize | int | netty網絡socket接收緩存區大小16MB | 131072 |
serverSocketSndBufSize | int | netty網絡socket發送緩存區大小16MB | 131072 |
serverWorkerThreads | int | netty業務線程池個數 | 8 |
shortPollingTimeMills | long | 短輪訓等待時間 | 1000 |
slaveReadEnable | boolean | 從節點是否可讀 | false |
startAcceptSendRequestTimeStamp | int | ||
storePathCommitLog | String | Commitlog存儲目錄預設為${storePathRootDir}/commitlog | /home/rocketmq/store/commitlog |
storePathRootDir | String | broker存儲目錄 預設為使用者的主目錄/store | /home/rocketmq/store |
syncFlushTimeout | long | 同步刷盤逾時時間 | 5000 |
traceOn | boolean | true | |
transactionCheckInterval | long | 事物回查周期 | 60000 |
transactionCheckMax | int | 事物回查次數 | 15 |
transactionTimeOut | long | 事物回查逾時時間 | 6000 |
transferMsgByHeap | boolean | 消息傳輸是否使用堆記憶體 | true |
transientStorePoolEnable | boolean | Commitlog是否開啟 transientStorePool機制,預設為 false | false |
transientStorePoolSize | int | transientStorePool中緩存 ByteBuffer個數,預設5個 | 5 |
useEpollNativeSelector | boolean | 是否啟用Epoll IO模型。Linux環境建議開啟 | false |
useReentrantLockWhenPutMessage | boolean | 消息存儲到commitlog檔案時擷取鎖類型,如果為true使用ReentrantLock否則使用自旋鎖 | false |
useTLS | boolean | 是否使用安全傳輸層協定 | false |
waitTimeMillsInHeartbeatQueue | long | 清理broker心跳線程等待時間 | 31000 |
waitTimeMillsInPullQueue | long | 清除消息拉取線程池任務隊列的等待時間。如果系統時間減去任務放入隊列中的時間小于waitTimeMillsInPullQueue,本次請求任務暫時不移除該任務 | 5000 |
waitTimeMillsInSendQueue | long | 清除發送線程池任務隊列的等待時間。如果系統時間減去任務放入隊列中的時間小于waitTimeMillsInSendQueue,本次請求任務暫時不移除該任務 | 200 |
waitTimeMillsInTransactionQueue | long | 清理送出和復原消息線程隊列等待時間 | 3000 |
warmMapedFileEnable | boolean | 是否溫和地使用 MappedFile如果為true,将不強制将記憶體映射檔案鎖定在記憶體中 | false |
connectWhichBroker | String | FilterServer連接配接的Broker位址 | |
filterServerIP | String | FilterServerIP位址,預設為本地伺服器IP | |
compressMsgBodyOverHowmuch | int | 如果消息Body超過該值則啟用 | |
zipCompresslevel | int | Zip壓縮方式,預設為5,詳細定義請參考java.util.Deflate中的定義 | |
clientUploadFilterClassEnable | boolean | 是否支援用戶端上傳 FilterClass代碼 | |
filterClassRepertoryUrl | String | filterClass服務位址,如果 clientUploadFilterClassEnable為false,則需要提供一個位址從該伺服器擷取過濾類的代碼 | |
fsServerAsyncSemaphorevalue | int | FilterServer異步請求并發度,預設為2048 | |
fsServerCallbackExecutorThreads | int | 處理回調任務的線程池數量,預設為64 | |
fsServerWorkerThreads | int | 遠端服務調用線程池數量,預設為64 |