RapperCL opened a new issue, #8203: URL: https://github.com/apache/rocketmq/issues/8203
### Before Creating the Enhancement Request - [X] I have confirmed that this should be classified as an enhancement rather than a bug/feature. ### Summary org.apache.rocketmq.store.timer.TimerMessageStore#doEnqueue ![image](https://github.com/apache/rocketmq/assets/44110731/23e78871-760c-4f3c-bd1f-db3909615622) When the remaining delay time of a message is greater than the time wheel period, the delayTime of such messages is set to the current time plus half a period or the current time plus the full period. However, this approach can result in an excessive concentration of messages with different delay times in the same time period, which should be distributed more evenly. To better handle this scenario, the current delay time should be taken into consideration, while also ensuring enough time for the next roll. Therefore: For messages with a difference of 1 to 4/3 of a period, give them 2/3 of a period to complete the roll. For messages with a difference greater than 4/3 of a period, use 1/10 of a period as the dispersal range. The reason for choosing a fixed increase of time greater than or equal to 9/10 of a period is to avoid too small increments that would increase the number of rolls. ### Motivation To avoid an overly concentrated distribution of delayed messages, ### Describe the Solution You'd Like To better handle this scenario, the current delay time should be taken into consideration, while also ensuring enough time for the next roll. Therefore: For messages with a difference of 1 to 4/3 of a period, give them 2/3 of a period to complete the roll. For messages with a difference greater than 4/3 of a period, use 1/10 of a period as the dispersal range. The reason for choosing a fixed increase of time greater than or equal to 9/10 of a period is to avoid too small increments that would increase the number of rolls. ### Describe Alternatives You've Considered add random time ### Additional Context _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@rocketmq.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org