Skip to main content
Version: 4.x

Server Configuration

NameServer configuration

NameDescriptionParameter typeDefault valueEffective valueImportance
rocketmqHomeRocketMQ main directory, default user main directoryString
namesrvAddrNameServer addressString
kvConfigpathKV configuration file path, including configuration information for ordered message topicsString
configStorePathNameServer configuration file path, it is recommended to use the -c option to specify the NameServer configuration file pathString
clusterTestWhether or not cluster testing is supported, default is falseboolean
orderMessageEnableWhether or not ordered messages are supported, default is falseboolean

Network configuration properties

NameDescriptionParameter typeDefault valueEffective valueImportance
accessMessageInMemorymaxRatioThe ratio of accessing messages in memoryint40(%)
adminBrokerThreadPoolNumsThe number of threads in the server's processing control console management command thread poolint16
autoCreateSubscriptionGroupWhether or not to automatically create consumer groupsbooleantruetrue/false
autoCreateTopicEnableWhether or not to automatically create topicsboolean
bitMapLengthConsumeQueueExtThe size of the extended filter bitmap for ConsumeQueueint112
brokerClusterNameBroker cluster nameStringTestCluster
brokerFastFailureEnableWhether or not to support broker fast failure. If true, it means that the sending message thread pool and message pulling thread pool will immediately clear the queued tasks and return a system errorbooleantrue
brokerIdBrokerID, 0 represents the main node, greater than 0 represents the slave nodeint0
brokerIP1Broker service addressString
brokerIP2Broker HAIP address, used for slave message synchronizationString
brokerNameBroker server name, morning server hostnameStringbroker-a
brokerPermissionBroker permissions, default is 6, meaning read-writeint6
brokerRoleBroker role, divided into ASYNC_MASTER, SYNC_MASTER, SLAVEenumASYNC_MASTER
brokerTopicEnableWhether or not broker name can be used as a subjectboolean
channelNotActiveIntervallong
checkCRCOnRecoverWhether or not to verify CRC during file recoveryboolean
cleanFileForciblyEnableWhether or not to support forced deletion of expired filesboolean
cleanResourceIntervalClear expired file thread scheduling frequencyint
clientAsyncSemaphoreValueThe frequency of client calls to invokeAsyncImpl methodint
clientCallbackExecutorThreadsThe number of client callback threadsint
clientChannelMaxIdleTimeSecondsThe maximum waiting time for each channel of the clientint
clientCloseSocketIfTimeoutWhether or not the client needs to wait when closing the socketbooleanfalse
clientManagerThreadPoolQueueCapacityThe initial size of the client management thread pool task queueint1000000
clientManageThreadPoolNumsThe number of threads for server to process client management (heartbeat, registration, unregistration)int32
clientOnewaySemaphoreValueThe control of client calls to invokeOnewayImpl method.int
clientPooledByteBufAllocatorEnableWhether client pooling memory enabledboolean
clientSocketRcvBufSizeSize of client socket receive bufferlong
clientSocketSndBufSizeSize of client socket send bufferlong
clientWorkerThreadsNumber of worker threadsint
clusterTopicEnableWhether cluster name is available for topic useboolean
commercialBaseCount
commercialBigCount
commercialEnable
commercialTimerCount
commitCommitLogLeastPagesMinimum number of dirty pages required for one commit, default 4 pages, for commitlog fileint
commitCommitLogThoroughIntervalMaximum interval between two commits of Commitlog, if exceeded, commitCommitLogLeastPages will be ignored and submitted directlyint200
commitIntervalCommitLogCommitlog commit frequencyint200
compressedRegisterWhether message compression is enabledboolean
connectTimeoutMillisConnection timeout timelong3000
consumerFallbehindThresholdMessage consumption piling threshold, default 16GB, effective when disableConsumeifConsumeIfConsumerReadSlowly is truelong17179869184
consumerManagerThreadPoolQueueCapacitySize of consumer management thread pool task queueint1000000
consumerManageThreadPoolNumsServer processing consumer management, getting consumer list, updating consumer progress, querying consumption progress, etc.int32
debugLockEnableWhether PutMessage Lock lock print information is supportedbooleanfalse
defaultQueryMaxNumDefault number of messages returned for query, default 32int32
defaultTopicQueueNumsNumber of queues created on a broker for a subjectint8
deleteCommitLogFilesIntervalTime interval for deleting commitlog files, delete one file and then wait for another fileint100
deleteConsumeQueueFilesIntervalTime interval for deleting consumequeue filesint100
deleteWhenUnder the condition of sufficient disk file space, what time of day to perform deleting expired files by default, 04 means 4amstring04
destroyMapedFileIntervalForciblyMaximum survival time of MappedFile that is rejected, default 120s. When the clear expired file thread first destroys the mappedfile, if the file is referenced by other threads, the reference count is greater than 0, the availability status of the MappedFile is set to false, and the first delete time is set. The next clear task arrives, if the system time is greater than the initial delete time plus this parameter, the ref count is reduced by 1000 once, until the reference count is less than 0, then release the physical resourceint120000
disableConsumeIfConsumerReadSlowlyWhether to disable the consumer group from continuing to consume messages if the consumer group message consumption is piled upbooleanfalse
diskFallRecordedWhether to count the disk usage, default is truebooleantrue
diskMaxUsedSpaceRatioMaximum usage ratio of the partition where the commitlog directory is located, if the usage ratio of the partition where the commitlog directory is located is greater than this value, the expired file deletion is triggeredint75
duplicationEnableWhether to allow duplicate replication, default is falsebooleanfalse
enableCalcFilterBitMapWhether to enable bit mapping.booleanfalse
enableConsumeQueueExtWhether to enable ConsumeQueue extended attributesbooleanfalse
enablePropertyFilterWhether filtering messages based on attributes is supported. If filtering messages based on standard SQL92 mode is used, this parameter must be set to true.booleanfalse
endTransactionPoolQueueCapacitySize of thread queue for processing commit and rollback messages thread poolint
endTransactionThreadPoolNumsProcessing commit and rollback message thread poolint24
expectConsumerNumUseFilterBloom filter parametersint32
fastFailIfNoBufferInStorePoolWhether fast failure is supported when getting ByteBuffer from transientStorepoolbooleanfalse
fetchNamesrvAddrByAddressServerWhether to support getting NameServer from serverbooleanfalse
fileReservedTimeFile retention time, default 72 hours, meaning that if the last update time of a non-current write file plus filereservedtime is less than the current time, the file will be clearedString120
filterDataCleanTimeSpanTime interval for clearing filter datalong86400000
filterServerNumsNumber of filter servers for broker serverint0
filterSupportRetryWhether message filtering supports retriesbooleanfalse
flushCommitLogLeastPagesMinimum number of dirty pages required for one flush, for commitlog fileint4
flushCommitLogTimedIndicates whether to wait for FlushIntervalCommitlog using the Thread.sleep method if await is truebooleanfalse
flushConsumeQueueLeastPagesMinimum number of dirty pages required for one flush, default 2 pages, for Consume fileint2
flushConsumeQueueThoroughIntervalMaximum interval between two flushs of Consume, if exceeded, will be ignored.int60000
flushConsumerOffsetHistoryIntervalushConsumeQueueLeastPages flush directlyint60000
flushConsumerOffsetIntervalFrequency of persisting message consumption progress in consumerOffse.json file (ms)int5000
flushDelayOffsetIntervalInterval for flushing delay queue pull progress, default 10slong10000
flushDiskTypeFlush mode, default is ASYNC_FLUSH (asynchronous flush), optional value SYNC_FLUSH (synchronous flush)enumASYNC_FLUSH
flushIntervalCommitLogCommitlog flush frequencyint500
flushIntervalConsumeQueueConsumuQueue file flush frequencyint1000
flushLeastPagesWhenWarmMapedFileHow often to fill the entire file with bytes 0, every x pages. Default 4096 pages, effective for asynchronous flush mode.int4096