RocketMQ broker配置参数

通用参数: 

brokerClusterName=default-cluster
brokerName=broker-b
brokerId=0
#- ASYNC_MASTER 异步复制Master   - SYNC_MASTER 同步双写Master   - SLAVE 
brokerRole=SYNC_MASTER
namesrvAddr=100.100.100.100:9876;100.100.100.101:9876
#在发送消息时,自动创建服务器不存在的topic,默认创建的队列数 
defaultTopicQueueNums=4
#Broker 对外服务的监听端口
listenPort=10911
#删除文件时间点,默认凌晨 4点
deleteWhen=04
#文件保留时间,默认 48 小时
fileReservedTime=120
#commitLog每个文件的大小默认1G 
mapedFileSizeCommitLog=1073741824 
#ConsumeQueue每个文件默认存30W条,根据业务情况调整 
mapedFileSizeConsumeQueue=300000 
#检测物理文件磁盘空间
diskMaxUsedSpaceRatio=75
#存储路径
storePathRootDir=/data/mq/rocketmq4.3/store
#commitLog 存储路径 
storePathCommitLog=/data/mq/rocketmq4.3/store/commitlog 
#消费队列存储路径存储路径 
storePathConsumeQueue=/data/mq/rocketmq4.3/store/consumequeue
#消息索引存储路径
storePathIndex=/data/mq/rocketmq4.3/store/index
#checkpoint 文件存储路径 
storeCheckpoint=/data/mq/rocketmq4.3/store/checkpoint 
#abort 文件存储路径 
abortFile=/data/mq/rocketmq4.3/store/abort 
#限制的消息大小
maxMessageSize=65536
#- ASYNC_FLUSH 异步刷盘 
#- SYNC_FLUSH 同步刷盘 
flushDiskType=SYNC_FLUSH
#并发send线程数,多线程来发送消息可能会出现broker busy
sendMessageThreadPoolNums=128
useReentrantLockWhenPutMessage=true

更多参数:

#是否允许 Broker 自动创建订 阅组,建议线下开启,线上关闭
autoCreateSubscriptionGroup true
brokerName broker-a
#默认为listenPort+1
haListenPort 10912
clientManagerThreadPoolQueueCapacity 1000000
flushCommitLogThoroughInterval 10000
flushCommitLogLeastPages 4
#客户端处理网络请求线程数
clientCallbackExecutorThreads  Runtime.getRuntime().availableProcessors()
notifyConsumerIdsChangedEnable true
expectConsumerNumUseFilter 32
cleanResourceInterval 10000
channelNotActiveInterval 60000
#检查物理文件磁盘空间
diskMaxUsedSpaceRatio 75
debugLockEnable false
#延迟等级,可扩展
messageDelayLevel 1s 5s 10s 30s 1m 2m 3m 4m 5m 6m 7m 8m 9m 10m 20m 30m 1h 2h
clusterTopicEnable true
messageIndexEnable true
serverPooledByteBufAllocatorEnable true
shortPollingTimeMills 1000
commercialEnable true
redeleteHangedFileInterval 120000
flushConsumerOffsetInterval 5000
#false实时刷盘,true定时刷盘
flushCommitLogTimed false
#允许发送的最大消息体大小
maxMessageSize  4194304
brokerId 0
syncFlushTimeout 5000
flushConsumeQueueThoroughInterval 60000
#无读写客户端存活时间
clientChannelMaxIdleTimeSeconds 120
flushDelayOffsetInterval 10000
serverSocketRcvBufSize 131072
#刷盘方式  - ASYNC_FLUSH 异步刷盘     - SYNC_FLUSH 同步刷盘 
flushDiskType ASYNC_FLUSH
#单次 Pull 消息(内存)传输的 最大字节数
maxTransferBytesOnMessageInMemory 262144
clientManageThreadPoolNums 32
serverChannelMaxIdleTimeSeconds 120
serverCallbackExecutorThreads 0
enablePropertyFilter false
transientStorePoolSize 5
enableConsumeQueueExt false
#单次 Pull 消息(磁盘)传输的 最大字节数
maxTransferBytesOnMessageInDisk 65536
#推送消息线程数
pullMessageThreadPoolNums  16 + Runtime.getRuntime().availableProcessors() * 2
clientCloseSocketIfTimeout false
#是否从 web 服务器获取 Name Server 地址 
fetchNamesrvAddrByAddressServer false
sendThreadPoolQueueCapacity 10000
diskFallRecorded true
transientStorePoolEnable false
offsetCheckInSlave false
disableConsumeIfConsumerReadSlowly false
commitCommitLogThoroughInterval 200
consumerManagerThreadPoolQueueCapacity 1000000
flushIntervalConsumeQueue 1000
clientOnewaySemaphoreValue 65535
warmMapedFileEnable false
slaveReadEnable false
transferMsgByHeap true
consumerFallbehindThreshold 17179869184
serverAsyncSemaphoreValue 64
startAcceptSendRequestTimeStamp 0
flushConsumerOffsetHistoryInterval 60000
brokerIP2 192.168.59.96
filterDataCleanTimeSpan 86400000
#单次 Pull 消息(磁盘)传输的 最大条数
maxTransferCountOnMessageInDisk 8
#本机 IP 地址
brokerIP1 192.168.59.96
deleteCommitLogFilesInterval 100
adminBrokerThreadPoolNums 16
#commitLog 存储路径
storePathCommitLog    /data/xxx/store/commitlog
#消费队列存储路径存储路径
storePathConsumeQueue    /data/xxx/store/consumequeue
#消息索引存储路径
storePathIndex    /data/xxx/store/index
#checkpoint 文件存储路径
storeCheckpoint    /data/xxx/store/checkpoint
#abort 文件存储路径
abortFile=/data/xxx/store/abort
filterServerNums 0
deleteConsumeQueueFilesInterval 100
checkCRCOnRecover true
serverOnewaySemaphoreValue 256
filterSupportRetry false
defaultQueryMaxNum 32
clientSocketRcvBufSize 131072
clientWorkerThreads 4
maxDelayTime 40
connectTimeoutMillis 3000
commercialTimerCount 1
clientPooledByteBufAllocatorEnable false
serverSocketSndBufSize 131072
regionId DefaultRegion
duplicationEnable false
#磁盘满、且无过期文件情况下 TRUE 表示强制删除文件,优先保证服务可用;FALSE 标记服务不可用,文件 不删除 
cleanFileForciblyEnable true
fastFailIfNoBufferInStorePool false
#是否拒绝事务消息接入 
rejectTransactionMessage false
serverSelectorThreads 3
consumerManageThreadPoolNums 32
haSendHeartbeatInterval 5000
mapedFileSizeConsumeQueue 6000000
commitCommitLogLeastPages 4
longPollingEnable true
flushConsumeQueueLeastPages 2
storePathRootDir C:UsersAdministratorstore
#默认topic队列数
defaultTopicQueueNums 8
highSpeedMode false
commercialBaseCount 1
maxErrorRateOfBloomFilter 20
accessMessageInMemoryMaxRatio 40
#是否允许 Broker 自动创建 Topic,建议线下开启,线上 关闭
autoCreateTopicEnable true
commitIntervalCommitLog 200
brokerTopicEnable true
namesrvAddr 127.0.0.1:9876
clientAsyncSemaphoreValue 65535
maxMsgsNumBatch 64
#文件保留时间,默认 48 小时
fileReservedTime 48
#删除文件时间点,默认凌晨 4点
deleteWhen 04
waitTimeMillsInSendQueue 200
commercialTransCount 1
osPageCacheBusyTimeOutMills 1000
maxIndexNum 20000000
registerBrokerTimeoutMills 6000
#是否提供安全的消息索引机 制,索引保证不丢 
messageIndexSafe false
putMsgIndexHightWater 600000
#Broker 对外服务的监听端口
listenPort 10911
serverWorkerThreads 8
clientSocketSndBufSize 131072
traceOn true
maxHashSlotNum 5000000
bitMapLengthConsumeQueueExt 112
#- ASYNC_MASTER 异步复制Master   - SYNC_MASTER 同步双写Master   - SLAVE 
brokerRole ASYNC_MASTER
rocketmqHome D:SoftwareDevJavaDevapache-rocketmq
#默认使用自旋锁,true使用重入锁
useReentrantLockWhenPutMessage false
haHousekeepingInterval 20000
brokerPermission 6
#单次 Pull 消息(内存)传输的 最大条数
maxTransferCountOnMessageInMemory 32
useEpollNativeSelector false
haSlaveFallbehindMax 268435456
haTransferBatchSize 32768
messageStorePlugIn 
pullThreadPoolQueueCapacity 100000
brokerClusterName DefaultCluster
enableCalcFilterBitMap false
destroyMapedFileIntervalForcibly 120000
mapedFileSizeCommitLog 1073741824
commercialBigCount 1
flushLeastPagesWhenWarmMapedFile 4096
#并发send线程数,多线程来发送消息可能会出现broker busy
sendMessageThreadPoolNums 1
#commitlog刷新到磁盘间隔
flushIntervalCommitLog 500
mappedFileSizeConsumeQueueExt 50331648

 

转载于:https://my.oschina.net/kyle1970/blog/2874953

  • 1
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值