rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug]The bufferLocal size of the TimerMessageStore not enough

Open ymwneu opened this issue 1 year ago • 0 comments

Before Creating the Bug Report

  • [x] I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • [x] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • [x] 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

ymwneu avatar Sep 02 '25 07:09 ymwneu