-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Description
Before Creating the Bug Report
-
I found a bug, not just asking a question, which should be created in GitHub Discussions.
-
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
-
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
centos
RocketMQ version
latest version
JDK Version
jdk8
Describe the Bug
There is a variable called bufferLocal in TimerMessageStore, which is used to store a single message from the commitlog. The initial size of bufferLocal is currently set to maxMessageSize plus 100 bytes. Since some properties may be added during the intermediate stages of scheduled messages, the maximum message size can exceed maxMessageSize. Although an extra 100 bytes is reserved during initialization, in some scenarios this is not sufficient, resulting in message read failures and subsequently blocking the entire scheduled message process.
Steps to Reproduce
Send a timer message with its size set to the maximum allowed message size.
What Did You Expect to See?
Messages can be retrieved normally in TimerDequeueGetMessageService.
What Did You See Instead?
An exception is thrown when retrieving messages in TimerDequeueGetMessageService.
Additional Context
No response