Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
344 commits
Select commit Hold shift + click to select a range
10a7fe8
comment: add concurrency control comments to method mergeAndRevive of…
winglechen May 27, 2026
5d121c1
Merge branch 'comment' of github.com:wolforest/rocketmq-comment into …
winglechen May 27, 2026
6145444
comment: add attribute comments to inflightReviveRequestMap of PopRev…
winglechen May 27, 2026
f24cae0
comment: add in-line comments to method reviveRetry of PopReviveService
winglechen May 27, 2026
241951d
comment: add method comments to reviveRetry of PopReviveService
winglechen May 27, 2026
d51909c
comment: add class comments to AckMessageProcessor
winglechen May 27, 2026
7a35bb4
comment: add class comments to ChangeInvisibleTimeProcessor
winglechen May 27, 2026
3efe3ba
comment: add note about default mode in PopMessageProcessor
winglechen May 28, 2026
76495cf
comment: add in-line comments to method processRequest of AckMessageP…
winglechen May 28, 2026
0485831
comment: add method comments to processRequest of AckMessageProcessor
winglechen May 28, 2026
7927a88
comment: add in-line comments to method processRequest of ChangeInvis…
winglechen May 28, 2026
0d5ebc9
comment: add in-line comments to method processRequestAsync of Change…
winglechen May 28, 2026
7b762e0
comment: add in-line comments to method appendCheckPointThenAckOrigin…
winglechen May 28, 2026
328195d
comment: add in-line comments to method ackOrigin of ChangeInvisibleT…
winglechen May 28, 2026
aa04f66
comment: update inline comment for appendCheckPointThenAckOrigin
winglechen May 28, 2026
b72eb4e
comment: add method comments to processRequestAsync of ChangeInvisibl…
winglechen May 28, 2026
37c4ae2
comment: add method comments to appendCheckPointThenAckOrigin of Chan…
winglechen May 28, 2026
92cf992
comment: add method comments to ackOrigin of ChangeInvisibleTimeProce…
winglechen May 28, 2026
97d68c8
comment: update inline comment for ack mode in AckMessageProcessor
winglechen May 28, 2026
fe753cb
comment: add in-line comments to method appendAck of AckMessageProcessor
winglechen May 28, 2026
f92c4e8
comment: add method comments to appendAck of AckMessageProcessor
winglechen May 28, 2026
d5f4348
comment: add class comments to PopMessageProcessor
winglechen May 28, 2026
72698c1
comment: add method comments to processRequest of PopMessageProcessor
winglechen May 28, 2026
24d2877
comment: add inline comments for kv path in PopMessageProcessor
winglechen May 28, 2026
318426e
comment: update inline comment for long polling in PopMessageProcessor
winglechen May 28, 2026
ed4aa41
comment: add in-line comments to method popAsync of PopConsumerService
winglechen May 28, 2026
de70be6
comment: add method comments to popAsync of PopConsumerService
winglechen May 28, 2026
31b092b
comment: add method comments to getMessageFromTopicAsync of PopConsum…
winglechen May 28, 2026
353f71b
comment: add in-line comments to method getMessageFromTopicAsync of P…
winglechen May 28, 2026
d2dc764
comment: add method comments to getMessageAsync of PopConsumerService
winglechen May 28, 2026
7737ed7
comment: add in-line comments to method getPopOffset of PopConsumerSe…
winglechen May 29, 2026
487dc96
comment: add method comments to getPopOffset of PopConsumerService
winglechen May 29, 2026
84b5585
comment: add method comments to handleGetMessageResult of PopConsumer…
winglechen May 29, 2026
19c6149
Merge branch 'apache:develop' into comment
winglechen May 29, 2026
d6a82d6
comment: add class comments to PopConsumerCache
winglechen May 29, 2026
ba20e32
comment: add interface comments to PopConsumerKVStore
winglechen May 29, 2026
9b9c92a
comment: add attribute comments to attemptId of PopConsumerRecord
winglechen May 29, 2026
4003b67
comment: add attribute comments to suspend of PopConsumerRecord
winglechen May 29, 2026
f185ded
comment: add class and attribute comments to ConsumerRecords of PopCo…
winglechen May 30, 2026
9623e49
comment: add attribute comments to consumerRecordTable of PopConsumer…
winglechen May 30, 2026
85dd752
comment: add method comments to writeRecords of PopConsumerCache
winglechen May 30, 2026
d7078e1
comment: add cache structure to PopConsumerCache
winglechen May 30, 2026
60fd9fa
comment: add method comments to hold of AbstractRocksDBStorage
winglechen May 30, 2026
0534da3
comment: add in-line comments to method initOptions of PopConsumerRoc…
winglechen May 30, 2026
b7c9988
comment: add method and inline comments to initOptions of PopConsumer…
winglechen May 30, 2026
0852219
comment: add method comments to postLoad of PopConsumerRocksdbStore
winglechen May 30, 2026
8a7d4d3
comment: add method comments to writeRecords of PopConsumerRocksdbStore
winglechen May 30, 2026
7571b11
comment: add method comments to deleteRecords of PopConsumerRocksdbStore
winglechen May 30, 2026
cc63393
comment: add method comments to scanExpiredRecords of PopConsumerRock…
winglechen May 30, 2026
627c1f9
comment: add method comments to ackAsync of PopConsumerService
winglechen May 31, 2026
0bc9ab2
comment: add method comments to changeInvisibilityDuration of PopCons…
winglechen May 31, 2026
af6ec7b
comment: add in-line comments to attribute invisibleTime
winglechen May 31, 2026
2434070
comment: optimize getKeyBytes comment in PopConsumerRecord
winglechen Jun 1, 2026
68c2ec5
comment: update writeRecords comment to match getKeyBytes
winglechen Jun 1, 2026
8ecba02
comment: add attribute comments to invisibleTime of PopConsumerRecord
winglechen Jun 1, 2026
3fb081f
comment: add method comments to getMessageAsync overloads of PopConsu…
winglechen Jun 1, 2026
2b4d321
Merge branch 'apache:develop' into comment
winglechen Jun 1, 2026
057eb18
comment: add external caller info to methods of PopConsumerService
winglechen Jun 1, 2026
fb481d9
Merge branch 'comment' of github.com:wolforest/rocketmq-comment into …
winglechen Jun 1, 2026
099cc8d
Merge branch 'apache:develop' into comment
winglechen Jun 1, 2026
39eab9f
comment: add method comments to run of PopConsumerService
winglechen Jun 1, 2026
30932d0
comment: add method comments to revive overloads of PopConsumerService
winglechen Jun 1, 2026
ce2758d
comment: update revive maxCount comment
winglechen Jun 1, 2026
d0c1ea0
comment: add in-line method revive of PopConsumerService
winglechen Jun 1, 2026
dd18745
comment: add in-line method reviveRetry of PopConsumerService
winglechen Jun 1, 2026
e4bdb2b
comment: add scan time comments to method revive of PopConsumerService
winglechen Jun 1, 2026
397eb37
comment: add in-line method scanExpiredRecords of PopConsumerService
winglechen Jun 1, 2026
1bf22dc
comment: add class comments to PopConsumerRocksdbStore
winglechen Jun 1, 2026
80e6f98
comment: add attribute comments to batchDispatchRequestQueue of Defau…
winglechen Jun 1, 2026
5327c63
comment: add in-line comments to method asyncPutMessage of DefaultMes…
winglechen Jun 1, 2026
0294b85
comment: add method comments to asyncPutMessage of DefaultMessageStore
winglechen Jun 1, 2026
5cf43ac
Merge branch 'apache:develop' into comment
winglechen Jun 1, 2026
9eefc30
comment: add in-line comments to method asyncPutMessage of CommitLog
winglechen Jun 1, 2026
5a39553
comment: add method comments to asyncPutMessage of CommitLog
winglechen Jun 1, 2026
6a79a9b
comment: add method comments to handleDiskFlushAndHA of CommitLog
winglechen Jun 1, 2026
8d6c189
comment: add in-line comments to method getMessage of DefaultMessageS…
winglechen Jun 2, 2026
75995e3
comment: add method comments to getMessage of DefaultMessageStore
winglechen Jun 2, 2026
2ccd095
comment: add method comments to getMessage of CommitLog
winglechen Jun 2, 2026
57b3beb
comment: update cache-status comment in log
winglechen Jun 2, 2026
a637850
comment: add in-line comments to method findMappedFileByOffset Mapped…
winglechen Jun 2, 2026
63ed93b
comment: optimize findMappedFileByOffset comment in MappedFileQueue
winglechen Jun 2, 2026
366ce8f
comment: add method comments to handleAutoRenew of ReceiveMessageActi…
winglechen Jun 2, 2026
c16179c
comment: delete useless comments of PopMessageProcessor
winglechen Jun 2, 2026
791f374
comment: add class comments to DefaultReceiptHandleManager
winglechen Jun 2, 2026
a0769db
Merge branch 'apache:develop' into comment
winglechen Jun 2, 2026
62a3575
comment: add class comments to ReceiptHandleProcessor
winglechen Jun 2, 2026
d0230d1
comment: add constructor comments to ReceiptHandleProcessor
winglechen Jun 2, 2026
6112186
comment: add inline comments to constructor of ReceiptHandleProcessor
winglechen Jun 2, 2026
6fd2dbe
comment: add inline comments to constructor of DefaultReceiptHandleMa…
winglechen Jun 2, 2026
2540bb5
comment: add method comments to scheduleRenewTask of DefaultReceiptHa…
winglechen Jun 2, 2026
fe4271b
comment: add method comments to startRenewMessage of DefaultReceiptHa…
winglechen Jun 2, 2026
06cdb22
comment: add method comments to queryRoute of RouteActivity
winglechen Jun 5, 2026
75a5676
comment: add method comments to queryAssignment of RouteActivity
winglechen Jun 5, 2026
359179e
Merge branch 'apache:develop' into comment
winglechen Jun 8, 2026
f7b3c3b
comment: optimize some comments of PopMessageProcessor
winglechen Jun 13, 2026
c6c5758
Merge branch 'comment' of github.com:wolforest/rocketmq-comment into …
winglechen Jun 13, 2026
8f6d9e6
Merge branch 'apache:develop' into comment
winglechen Jun 13, 2026
6d86274
comment: add inline comments to AckMessageProcessor
winglechen Jun 19, 2026
d42d061
comment: add inline comments to SendMessageProcessor
winglechen Jun 20, 2026
ee4d5fd
comment: add class comments to HookUtils
winglechen Jun 21, 2026
159ffa8
comment: add inline comments to method handleScheduleMessage of HookU…
winglechen Jun 21, 2026
4975184
comment: add inline comments to method transformTimerMessage of HookU…
winglechen Jun 21, 2026
2bff0b6
comment: add method comments to isReject of TimerMessageStore
winglechen Jun 21, 2026
6f119ae
Merge branch 'apache:develop' into comment
winglechen Jun 21, 2026
ac870e7
comment: add method comments to transformTimerMessage of HookUtils
winglechen Jun 21, 2026
e48a465
comment: add inline comments to local var sendTransactionPrepareMessa…
winglechen Jun 21, 2026
4f1394b
comment: add inline comments to local var sendTransactionPrepareMessa…
winglechen Jun 21, 2026
d795521
comment: add inline comments to method parseHalfMessageInner of Trans…
winglechen Jun 21, 2026
098222c
comment: add method comments to parseHalfMessageInner of Transactiona…
winglechen Jun 21, 2026
6c11f5c
comment: add inline comments to method asyncPutHalfMessage of Transac…
winglechen Jun 21, 2026
6b5dfc8
comment: add method comments to processRequest of EndTransactionProce…
winglechen Jun 21, 2026
926376e
comment: add inline comments to method processRequest of EndTransacti…
winglechen Jun 21, 2026
51fa2df
comment: add class comments to MessageQueueOpContext
winglechen Jun 21, 2026
aa20655
comment: add inline comments to TransactionalMessageServiceImpl
winglechen Jun 21, 2026
06f37e8
comment: add method comments to deletePrepareMessage of EndTransactio…
winglechen Jun 21, 2026
daa2662
comment: add method comments to deletePrepareMessage of Transactional…
winglechen Jun 21, 2026
2d9fa25
comment: add inline comments to method deletePrepareMessage of Transa…
winglechen Jun 21, 2026
1ed4bc4
comment: add class comments to TransactionalMessageCheckService
winglechen Jun 22, 2026
c9a77d5
comment: add method comments to check of TransactionalMessageServiceImpl
winglechen Jun 22, 2026
ff8737e
comment: add class comments to TransactionalOpBatchService
winglechen Jun 22, 2026
ef948e1
comment: add method comments to batchSendOpMessage of TransactionalMe…
winglechen Jun 22, 2026
fd1a685
comment: add inline comments to getOpMessage and batchSendOpMessage
winglechen Jun 22, 2026
5c043c3
comment: add comments about deleteContext key
winglechen Jun 22, 2026
223e80a
comment: add inline comments to method check of TransactionalMessageS…
winglechen Jun 23, 2026
854db13
Merge branch 'apache:develop' into comment
winglechen Jun 23, 2026
cf0dc6c
comment: add method comments to needDiscard of TransactionalMessageSe…
winglechen Jun 23, 2026
fb9e711
comment: add method comments to needSkip of TransactionalMessageServi…
winglechen Jun 23, 2026
71be7f1
comment: add method comments to getImmunityTime of TransactionalMessa…
winglechen Jun 23, 2026
146da0f
comment: add method comments to renewImmunityHalfMessageInner of Tran…
winglechen Jun 23, 2026
5267373
comment: add inline comments to checkPrepareQueueOffset
winglechen Jun 23, 2026
219c99f
comment: add method comments to putImmunityMsgBackToHalfQueue of Tran…
winglechen Jun 23, 2026
1a67e51
comment: add method comments to checkPrepareQueueOffset of Transacti…
winglechen Jun 23, 2026
58e2678
comment: optimize checkPrepareQueueOffset javadoc and inline comments
winglechen Jun 23, 2026
41cf6b4
comment: add var comments to removeMap,opMsgMap,doneOpOffset of Trans…
winglechen Jun 24, 2026
433c5b2
comment: optimize var comments to removeMap,opMsgMap,doneOpOffset of …
winglechen Jun 24, 2026
d33ffaa
comment: add javadoc to resolveDiscardMsg
winglechen Jun 24, 2026
e5af872
comment: add javadoc to resolveHalfMsg
winglechen Jun 24, 2026
5d8dcc6
comment: add inline comments to method sendCheckMessage of AbstractTr…
winglechen Jun 24, 2026
a1370ae
comment: add javadoc to writeTelemetryCommand
winglechen Jun 24, 2026
810b300
comment: add inline comment to telemetryCommandRef
winglechen Jun 24, 2026
29cdd73
comment: optimize telemetryCommandRef inline comment
winglechen Jun 24, 2026
d974b29
comment: add javadoc and inline comments to MessageRocksDBStorage
winglechen Jun 25, 2026
f3c521e
comment: add javadoc and inline comments to AbstractRocksDBStorage
winglechen Jun 25, 2026
1d3ccc8
comment: add javadoc and inline comments to TransMessageRocksDBStore
winglechen Jun 25, 2026
9dbaf98
merge: merge dev and handle conflict
winglechen Jun 25, 2026
64a386e
comment: add inline comments to TransMessageRocksDBStore and TransRoc…
winglechen Jun 25, 2026
77a8829
comment: add javadoc to TransRocksDBRecord.getValueBytes
winglechen Jun 25, 2026
ddca960
comment: add javadoc and analysis to TransRocksDBRecord.getValueBytes…
winglechen Jun 25, 2026
1e74bdf
comment: add class-level javadoc, field comments, constructor and dec…
winglechen Jun 26, 2026
5ad8eaa
comment: add javadoc to registerMessageStoreHook in BrokerController
winglechen Jun 26, 2026
4a955eb
comment: add javadoc to sendMessageBack in HookUtils
winglechen Jun 26, 2026
6be4034
comment: add import for SendMessageBackHook in HookUtils
winglechen Jun 26, 2026
86e8d5d
comment: add javadoc to handleScheduleMessage in HookUtils
winglechen Jun 26, 2026
b47ad49
comment: add javadoc to checkBeforePutMessage in HookUtils
winglechen Jun 26, 2026
dbf268b
comment: add javadoc to handleLmqQuota in HookUtils
winglechen Jun 26, 2026
177f391
comment: optimize checkBlock javadoc in ConsumerOrderInfoManager
winglechen Jun 26, 2026
9be3734
Revert "comment: optimize checkBlock javadoc in ConsumerOrderInfoMana…
winglechen Jun 26, 2026
924ff95
comment: add javadoc to checkBlock in QueueLevelConsumerManager
winglechen Jun 26, 2026
10b315f
comment: add inline comments to method update of QueueLevelConsumerMa…
winglechen Jun 27, 2026
b560b2c
comment: add inline comments to method mergeOffsetConsumedCount of Qu…
winglechen Jun 27, 2026
db77e06
comment: add javadoc to needBlock in QueueLevelConsumerManager.OrderInfo
winglechen Jun 27, 2026
0fdb095
comment: add inline comments to method needBlock of QueueLevelConsume…
winglechen Jun 27, 2026
334b099
comment: expand javadoc for offsetNextVisibleTime in QueueLevelConsum…
winglechen Jun 27, 2026
dc62d0c
comment: add inline comment to invisibleTime field in QueueLevelConsu…
winglechen Jun 27, 2026
b05cb70
comment: add called time to method checkBlock, update, commitAndNext …
winglechen Jun 27, 2026
84e2d60
comment: add class-level javadoc to QueueLevelConsumerOrderInfoLockMa…
winglechen Jun 27, 2026
b49515a
comment: add javadoc to ackOrderly in AckMessageProcessor
winglechen Jun 27, 2026
d62233d
comment: add javadoc to ackOrderlyNew in AckMessageProcessor
winglechen Jun 27, 2026
d48debe
comment: add inline comments to method ackOrderly of AckMessageProcessor
winglechen Jun 27, 2026
edf56a1
Merge branch 'apache:develop' into comment
winglechen Jun 30, 2026
b1983d8
comment: add javadoc to LiteSubscriptionCtlProcessor class and proces…
winglechen Jul 2, 2026
4aa9ed2
comment: add class-level javadoc to LiteSubscriptionRegistryImpl
winglechen Jul 2, 2026
04dfaad
comment: add javadoc to map fields in LiteSubscriptionRegistryImpl
winglechen Jul 2, 2026
48cfb15
Merge branch 'apache:develop' into comment
winglechen Jul 2, 2026
eb14b4a
comment: add javadoc to addPartialSubscription in LiteSubscriptionReg…
winglechen Jul 2, 2026
a86a605
comment: add javadoc to OffsetOption class, constants, and Type enum
winglechen Jul 2, 2026
cb7a37a
comment: add javadoc to addCompleteSubscription in LiteSubscriptionRe…
winglechen Jul 2, 2026
07dca9a
comment: add javadoc to LiteShardingImpl class and shardingByLmqName …
winglechen Jul 2, 2026
58cd597
comment: refine javadoc format and add blank line in LiteShardingImpl
winglechen Jul 3, 2026
167a030
comment: add field-level javadoc to TopicRouteData
winglechen Jul 3, 2026
d5dfc67
comment: add some inline comments to lmq related functionality of Sen…
winglechen Jul 3, 2026
8985e0e
comment: add javadoc to topicAllowsLMQ in MixAll
winglechen Jul 3, 2026
5f3abf8
comment: add javadoc to handlePropertiesForLmqMsg in CommitLog
winglechen Jul 3, 2026
c01e492
comment: add javadoc to LmqDispatch class and both helper methods
winglechen Jul 3, 2026
1dcf056
comment: optimize comments of method handlePropertiesForLmqMsg
winglechen Jul 3, 2026
f3f650f
comment: refine LmqDispatch javadoc and add blank lines
winglechen Jul 4, 2026
30486d2
comment: add called time to method wrapLmqDispatch, updateLmqOffsets …
winglechen Jul 4, 2026
fead74b
comment: add inline comments to ReputMessageService.doReput
winglechen Jul 6, 2026
af3b913
comment: add javadoc and inline comments to CommitLogDispatcherBuildC…
winglechen Jul 6, 2026
d483af7
comment: add javadoc to putMessagePositionInfoWrapper in ConsumeQueue…
winglechen Jul 6, 2026
9675bf6
comment: add class-level javadoc to CombineConsumeQueueStore
winglechen Jul 7, 2026
d94cd5a
Merge branch 'apache:develop' into comment
winglechen Jul 7, 2026
d7dad53
comment: add javadoc to innerConsumeQueueStoreList in CombineConsumeQ…
winglechen Jul 7, 2026
9ab64c0
comment: refine innerConsumeQueueStoreList javadoc format
winglechen Jul 7, 2026
2bfd82f
comment: optimize comments of CombineConsumeQueueStore.innerConsumeQu…
winglechen Jul 7, 2026
f67687c
comment: optimize attributes comments of innerConsumeQueueStoreList
winglechen Jul 7, 2026
0cb6a6f
comment: optimize comments of innerConsumeQueueStoreList
winglechen Jul 7, 2026
21bc31e
comment: add javadoc and phase comments to CombineConsumeQueueStore c…
winglechen Jul 7, 2026
29c829d
comment: condense CombineConsumeQueueStore constructor javadoc
winglechen Jul 7, 2026
28f414c
comment: add class-level javadoc to RocksDBConsumeQueueStore
winglechen Jul 7, 2026
a11e5c4
comment: refine RocksDBConsumeQueueStore javadoc format
winglechen Jul 7, 2026
4c8872f
comment: add javadoc to RocksGroupCommitService class and methods
winglechen Jul 7, 2026
51270ad
comment: add javadoc to putMessagePosition in RocksDBConsumeQueueStore
winglechen Jul 7, 2026
dfa4923
Merge branch 'apache:develop' into comment
winglechen Jul 7, 2026
cd80ecd
comment: add javadoc to putMessagePosition0 in RocksDBConsumeQueueStore
winglechen Jul 7, 2026
28a520b
comment: refine putMessagePosition0 inline comments
winglechen Jul 7, 2026
31afdc8
comment: simplify inline comments in putMessagePosition0
winglechen Jul 7, 2026
113d4ef
comment: add javadoc to cqBBPairList in RocksDBConsumeQueueStore
winglechen Jul 7, 2026
2f5e216
comment: add javadoc to offsetBBPairList in RocksDBConsumeQueueStore
winglechen Jul 7, 2026
fccaca9
comment: add javadoc to tempTopicQueueMaxOffsetMap in RocksDBConsumeQ…
winglechen Jul 7, 2026
69f6b73
comment: optimize attribute comments of RocksDBConsumeQueueStore
winglechen Jul 7, 2026
bbec9ff
comment: optimize attribute comments of RocksDBConsumeQueueStore
winglechen Jul 7, 2026
ac35d77
comment: add javadoc to updateTempTopicQueueMaxOffset
winglechen Jul 7, 2026
c9a5190
comment: refine updateTempTopicQueueMaxOffset javadoc
winglechen Jul 7, 2026
9d56df0
comment: add one-line comment to dispatch method
winglechen Jul 7, 2026
12d2cc3
comment: add inline comments to containsLMQ in DispatchRequest
winglechen Jul 7, 2026
a0cfdae
comment: add inline comments to dispatchLMQ in RocksDBConsumeQueueStore
winglechen Jul 7, 2026
eafdf08
comment: add javadoc to dispatchLMQ
winglechen Jul 7, 2026
c82f891
comment: condense dispatchLMQ javadoc
winglechen Jul 7, 2026
a81e023
comment: add javadoc to rangeQuery in RocksDBConsumeQueueTable
winglechen Jul 8, 2026
ecee7ec
comment: refine rangeQuery javadoc format
winglechen Jul 8, 2026
aa73ccc
comment: add inline comments to rangeQuery in RocksDBConsumeQueueTable
winglechen Jul 9, 2026
b72f697
comment: add inline comments to ackLite in AckMessageProcessor
winglechen Jul 9, 2026
b7f53af
comment: add inline comment to processChangeInvisibleTimeForLite
winglechen Jul 9, 2026
d7a8395
comment: add javadoc to preCheck in PopLiteMessageProcessor
winglechen Jul 9, 2026
5528653
comment: reformat preCheck javadoc as bulleted list
winglechen Jul 9, 2026
a1b8839
comment: add javadoc to popByClientId in PopLiteMessageProcessor
winglechen Jul 9, 2026
1475d0c
comment: reformat popByClientId javadoc and add missing import
winglechen Jul 9, 2026
0269f47
comment: add javadoc to LiteSubModel
winglechen Jul 9, 2026
f4c9be0
comment: reflow LiteSubModel javadoc indentation
winglechen Jul 9, 2026
a8cd65e
comment: add javadoc to popLiteTopic in PopLiteMessageProcessor
winglechen Jul 9, 2026
ad34760
comment: add javadoc to findOrCreateConsumeQueue in RocksDBConsumeQue…
winglechen Jul 9, 2026
450ad04
comment: reformat findOrCreateConsumeQueue javadoc
winglechen Jul 9, 2026
40d70a1
comment: reformat findOrCreateConsumeQueue javadoc
winglechen Jul 9, 2026
ff912c1
comment: optimize comments of QueueLevelConsumerManager
winglechen Jul 10, 2026
206a603
comment: add class comments to LiteEventDispatcher
winglechen Jul 10, 2026
7ea9fee
Merge branch 'apache:develop' into comment
winglechen Jul 11, 2026
dab7414
add comments to LiteSubscriptionRegistryImpl.addPartialSubscription
winglechen Jul 11, 2026
0a8e44a
add comments to removeTopicGroup
winglechen Jul 11, 2026
b07d46a
add inline comments to excludeClientByLmqName
winglechen Jul 11, 2026
8c29642
add comments to ProxyClientRemotingProcessor
winglechen Jul 11, 2026
a159b75
add comments to ConfigManagerVersion
winglechen Jul 12, 2026
a4b848e
add inline comments to BrokerController constructor config backend se…
winglechen Jul 12, 2026
eeebedd
comment: optimize comments of AbstractRocksDBStorage
winglechen Jul 28, 2026
6055ed1
merge: merge dev and handle conflict
winglechen Aug 1, 2026
4b393ba
add categorized comments to BrokerConfig fields
winglechen Aug 7, 2026
8e0a89f
merge: merge dev and handle conflict
winglechen Aug 7, 2026
0cc35bb
add categorized comments to MessageStoreConfig fields
winglechen Aug 7, 2026
d0b4276
add Javadoc comments to BrokerController fields
winglechen Aug 8, 2026
af98256
merge: merge dev and handle conflict
winglechen Aug 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
138 changes: 138 additions & 0 deletions broker/src/main/java/org/apache/rocketmq/broker/BrokerController.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.tuple.Triple;
import org.apache.rocketmq.broker.BrokerController;
import org.apache.rocketmq.broker.offset.ConsumerOffsetManager;
import org.apache.rocketmq.common.BrokerConfig;
import org.apache.rocketmq.common.ServiceThread;
import org.apache.rocketmq.common.constant.LoggerName;
Expand All @@ -48,6 +49,36 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Function;

/**
* Routes LMQ arrival events to Lite Pop clients.
* maintaining a per-client bounded event queue,
* and waking long-polling consumers when new messages become available.
* useless for grpc client.
*
* <p>Key responsibilities:
* <ul>
* <li>{@link #dispatch} selects one client from a (group, lmq) subscriber
* list (with random rotation plus exclusion of the recently-removed
* client) and appends the LMQ name to that client's
* {@link ClientEventSet}.</li>
* <li>{@link #scan} runs periodically to (a) evict event sets whose
* client appears inactive or whose queue is full and (b) execute
* delayed full-dispatch tasks to recover from event-queue
* overflow.</li>
* <li>{@link #tryDispatchToClient} / {@link ClientEventSet} implement
* the per-client event queue with a dual data structure for
* deduplication and a soft-cap that can be refreshed at runtime
* via the {@code liteEventCapacityCacheTtlMs} TTL.</li>
* <li>{@link LiteCtlListenerImpl} bridges subscription-state changes
* to dispatch: registration schedules a full dispatch, removal of
* all subscriptions re-dispatches the orphaned events to other
* clients in the same group.</li>
* </ul>
*
* <p>The class is also the producer of the long-polling wake-up signal:
* after a successful client selection it calls
* {@link PopLiteMessageProcessor#getPopLiteLongPollingService PopLiteMessageProcessor.getPopLiteLongPollingService}{@code .notifyMessageArriving(...)}.
*/
public class LiteEventDispatcher extends ServiceThread {

private static final Logger LOGGER = LoggerFactory.getLogger(LoggerName.ROCKETMQ_POP_LITE_LOGGER_NAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@

import java.util.List;

/**
* Default {@link LiteSharding} implementation: assigns each LMQ to a broker
* queue via consistent hashing of the lite topic segment. The sharding
* result is consumed by {@code AbstractLiteLifecycleManager} to decide
* whether a subscription should be accepted locally.
*
* <p>When the parent topic has no known route, or the LMQ name does not
* parse into a lite topic, the current broker is returned as a fallback so
* that subscription requests are not silently dropped during transient
* routing gaps.
*/
public class LiteShardingImpl implements LiteSharding {

private final BrokerController brokerController;
Expand All @@ -38,6 +49,14 @@ public LiteShardingImpl(BrokerController brokerController, TopicRouteInfoManager
this.topicRouteInfoManager = topicRouteInfoManager;
}

/**
* Compute the broker that owns the given LMQ via consistent hashing of
* the lite topic segment over the parent's write queues.
* Falls back to the current broker name when
* - the parent route is missing,
* - or has no queues,
* - or the LMQ name is not a valid lite topic.
*/
@Override
public String shardingByLmqName(String parentTopic, String lmqName) {
TopicPublishInfo topicPublishInfo = topicRouteInfoManager.tryToFindTopicPublishInfo(parentTopic);
Expand All @@ -53,6 +72,7 @@ public String shardingByLmqName(String parentTopic, String lmqName) {
if (StringUtils.isEmpty(liteTopic)) {
return brokerController.getBrokerConfig().getBrokerName();
}

int bucket = Hashing.consistentHash(liteTopic.hashCode(), writeQueues.size());
MessageQueue targetQueue = writeQueues.get(bucket);
return targetQueue.getBrokerName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,51 @@
import org.apache.rocketmq.logging.org.slf4j.LoggerFactory;
import org.apache.rocketmq.remoting.protocol.header.NotifyUnsubscribeLiteRequestHeader;

/**
* Maintains the client → LMQ subscription mapping for Lite Topics.
*
* <p>Two main indexes are kept in sync:
* <ul>
* <li>{@link #client2Subscription} — clientId → {@link LiteSubscription}
* (group, topic, lmqName set) for COMPLETE-mode reconciliation</li>
* <li>{@link #liteTopic2Group} — lmqName → set of {@link ClientGroup}
* for fast subscription lookup during Pop dispatch</li>
* </ul>
*
* <p>Supports four subscription actions: PARTIAL_ADD, PARTIAL_REMOVE,
* COMPLETE_ADD, COMPLETE_REMOVE. When a group is configured for
* exclusive subscription ({@code isSubLiteExclusive}), subscribing a
* different client to the same lmqName evicts the previous client
* (tracked via {@link ExclusiveEvictionTombstones} for re-send
* convergence). Wildcard groups are supported by mapping them to a
* synthetic mock lmqName ({@code topic@group}).
*
* <p>A background thread ({@link #run}) periodically removes
* subscriptions whose last update exceeds the configured timeout.
*/
public class LiteSubscriptionRegistryImpl extends ServiceThread implements LiteSubscriptionRegistry {
private static final Logger LOGGER = LoggerFactory.getLogger(LoggerName.ROCKETMQ_POP_LITE_LOGGER_NAME);

/** Active clientId → Netty channel, used to push unsubscribe notifications. */
protected final ConcurrentMap<String/*clientId*/, Channel> clientChannels = new ConcurrentHashMap<>();

/** Primary forward index: clientId → its full subscription (group, topic, lmq set). */
protected final ConcurrentMap<String/*clientId*/, LiteSubscription> client2Subscription = new ConcurrentHashMap<>();

/**
* Reverse index: lmqName → clients subscribed to it, for Pop dispatch lookup.
* lmqName -> {clientId, group}
*/
protected final ConcurrentMap<String/*lmqName*/, Set<ClientGroup>> liteTopic2Group = new ConcurrentHashMap<>();

/**
* Tracks which groups are wildcard-mode for each parent topic.
* Wildcard Group is a special subscription mode in Lite Topic
* where a single group receives messages from all LMQs under its parent topic
*/
protected final ConcurrentMap<String/*topic*/, Set<String/*group*/>> wildcardGroupMap = new ConcurrentHashMap<>();

/** Cached expansion of wildcard group clients per group, 30s TTL. */
private final Cache<String/*group*/, List<ClientGroup>> wildcardClientCache =
CacheBuilder.newBuilder().maximumSize(2000).expireAfterWrite(30, TimeUnit.SECONDS).build();

Expand All @@ -78,14 +116,40 @@ public void updateClientChannel(String clientId, Channel channel) {
clientChannels.put(clientId, channel);
}

/**
* Add a partial subscription for {@code lmqNameSet} to the given client,
* union with whatever the client already subscribes to.
*
* <p>Rejects the call with {@link LiteQuotaException} if the total active
* (client, liteTopic) reference count would exceed
* {@code maxLiteSubscriptionCount}, and with {@link IllegalStateException}
* if the group is a wildcard group (use {@link #addCompleteSubscription}
* instead).
*
* <p>For each lmqName that is still subscription-active, the call:
* <ol>
* <li>Adds the lmqName to the client's {@link LiteSubscription};</li>
* <li>In exclusive mode, evicts the previous holder of the same
* (group, lmqName) pair and clears any stale tombstone for the
* caller;</li>
* <li>Applies {@code offsetOption} via {@link #resetOffset};</li>
* <li>Registers the (clientId, group) in
* {@link #liteTopic2Group}.</li>
* </ol>
*/
@Override
public void addPartialSubscription(String clientId, String group, String topic, Set<String> lmqNameSet,
OffsetOption offsetOption) {
// default maxLiteSubscriptionCount is 100000
long maxCount = brokerController.getBrokerConfig().getMaxLiteSubscriptionCount();
if (getActiveSubscriptionNum() >= maxCount) {
// No need to check existence, if reach here, it must be new.
throw new LiteQuotaException("lite subscription quota exceeded " + maxCount);
}

// Wildcard group is not supported
// Wildcard group receives all LMQ message from a parent topic
// Wildcard group is same as normal group
if (LiteMetadataUtil.isWildcardGroup(group, brokerController)) {
throw new IllegalStateException("subscribe lite operation is not supported for this group");
}
Expand All @@ -94,18 +158,22 @@ public void addPartialSubscription(String clientId, String group, String topic,
// Utilize existing string object
final ClientGroup clientGroup = new ClientGroup(clientId, thisSub.getGroup());
for (String lmqName : lmqNameSet) {
// subscription exists or sharding to this broker
if (!liteLifecycleManager.isSubscriptionActive(topic, lmqName)) {
continue;
}
thisSub.addLiteTopic(lmqName);
// First remove the old subscription

// if exclusive mode: evict previous holder
if (LiteMetadataUtil.isSubLiteExclusive(group, brokerController)) {
excludeClientByLmqName(clientId, group, lmqName);
// Boundary case: this client may have a stale tombstone from a previous eviction.
// Since it is now actively re-claiming the lmqName, clear its own tombstone so
// subsequent popLiteTopic is not blocked by the stale mark.
exclusiveEvictionTombstones.remove(clientId, lmqName);
}

// set subscription start offset
resetOffset(lmqName, group, clientId, offsetOption);
addTopicGroup(clientGroup, lmqName);
}
Expand All @@ -122,6 +190,20 @@ public void removePartialSubscription(String clientId, String group, String topi
}
}

/**
* Replace the client's full subscription set with {@code lmqNameAll}
* (filtered to active lmqNames). For wildcard groups, the new set is
* reduced to a single synthetic lmqName and the wildcard marker is
* registered.
*
* <p>The implementation diffs the previous set against the new one:
* lmqNames no longer in the new set are removed from the forward and
* reverse indexes; lmqNames added are registered. In exclusive groups,
* any leftover eviction tombstones for the client are either re-notified
* (if the lmqName is still in the new set, indicating the previous
* unsubscribe notification was lost) or cleaned up (if the lmqName is no
* longer subscribed).
*/
@Override
public void addCompleteSubscription(String clientId, String group, String topic, Set<String> lmqNameAll, long version) {
Set<String> lmqNameNew;
Expand Down Expand Up @@ -269,6 +351,22 @@ public void cleanSubscription(String lmqName, boolean notifyClient) {
}
}

/**
* Register the given (clientId, group) pair in the reverse index for the LMQ.
*
* <p>The reverse index {@link #liteTopic2Group} maps lmqName → set of
* subscribed ClientGroups, used during Pop dispatch to find which client(s)
* should receive messages.
*
* <p>If this (clientGroup, lmqName) pair is new (not a duplicate):
* <ol>
* <li>Increments the global active reference counter;</li>
* <li>Invalidates the wildcard group cache if the group is a wildcard group,
* so the next wildcard expansion sees up-to-date membership;</li>
* <li>Notifies all registered {@link LiteCtlListener listeners} of the new
* subscription binding.</li>
* </ol>
*/
protected void addTopicGroup(ClientGroup clientGroup, String lmqName) {
Set<ClientGroup> topicGroupSet = liteTopic2Group
.computeIfAbsent(lmqName, k -> ConcurrentHashMap.newKeySet());
Expand All @@ -281,6 +379,24 @@ protected void addTopicGroup(ClientGroup clientGroup, String lmqName) {
}
}

/**
* Unregister the given (clientId, group) pair from the reverse index for the LMQ.
*
* <p>This is the counterpart of {@link #addTopicGroup}. If the pair was
* actually present (not a no-op):
* <ol>
* <li>Decrements the global active reference counter;</li>
* <li>Invalidates the wildcard group cache if applicable;</li>
* <li>Notifies all registered {@link LiteCtlListener listeners} of the
* subscription removal;</li>
* <li>If {@code resetOffset} is {@code true}, resets the consumer offset
* to the minimum value (0) via {@link #resetOffset}.</li>
* </ol>
*
* <p>If the set of subscribers for this lmqName becomes empty after removal,
* the lmqName entry is cleaned up from {@link #liteTopic2Group} and the
* wildcard group marker is removed if this was a synthetic wildcard LMQ.
*/
protected void removeTopicGroup(ClientGroup clientGroup, String lmqName, boolean resetOffset) {
Set<ClientGroup> topicGroupSet = liteTopic2Group.get(lmqName);
if (topicGroupSet == null) {
Expand All @@ -304,7 +420,11 @@ protected void removeTopicGroup(ClientGroup clientGroup, String lmqName, boolean
}

/**
* Remove clients that subscribe to the same liteTopic under the same group
* Remove clients that subscribe to the same liteTopic under the same group.
* - remove liteTopic from client2Subscription by clientId
* - add exclusive tombstones
* - call client to notify unsubscribe event
* - call removeTopicGroup
*/
protected void excludeClientByLmqName(String newClientId, String group, String lmqName) {
Set<ClientGroup> clientSet = liteTopic2Group.get(lmqName);
Expand All @@ -324,11 +444,14 @@ protected void excludeClientByLmqName(String newClientId, String group, String l
client2Subscription.remove(clientGroup.clientId);
}
}

exclusiveEvictionTombstones.add(clientGroup.clientId, lmqName);
notifyUnsubscribeLite(clientGroup.clientId, clientGroup.group, lmqName);

boolean resetOffset = LiteMetadataUtil.isResetOffsetInExclusiveMode(group, brokerController);
LOGGER.info("excludeClientByLmqName group:{}, lmqName:{}, resetOffset:{}, clientId:{} -> {}",
group, lmqName, resetOffset, clientGroup.clientId, newClientId);

removeTopicGroup(clientGroup, lmqName, resetOffset);
});
}
Expand Down Expand Up @@ -502,4 +625,4 @@ public boolean hasExclusiveEvictionTombstone(String clientId, String lmqName) {
return exclusiveEvictionTombstones.contains(clientId, lmqName);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,24 @@
import static org.apache.rocketmq.broker.longpolling.PollingResult.POLLING_SUC;
import static org.apache.rocketmq.broker.longpolling.PollingResult.POLLING_TIMEOUT;

/**
* Pop-mode long polling service that suspends Pop requests and wakes them up when new messages arrive.
* <p>
* Core responsibilities:
* <ul>
* <li>Suspend Pop requests — when the broker has no messages to return immediately, registers requests
* into the {@code pollingMap} keyed by {@code topic@cid@queueId} and waits</li>
* <li>Wake up on new message arrival — {@link #notifyMessageArriving} is triggered by the message arriving
* listener; it fetches matching Pop requests from the pollingMap, applies Tag filtering, and re-submits
* them to the PopMessageProcessor to return results to the client</li>
* <li>Timeout scanning — the background thread periodically scans the waiting queues and wakes up
* timed-out requests with an empty result</li>
* <li>Retry topic bridging — {@link #notifyMessageArrivingFromRetry} translates a new message on the retry
* topic into a wake-up notification on the original topic</li>
* <li>Resource cleanup — periodically removes stale polling entries for deleted topics or
* offline consumer groups</li>
* </ul>
*/
public class PopLongPollingService extends ServiceThread {

private static final Logger POP_LOGGER =
Expand Down
Loading