SSS-K opened a new issue, #5376:
URL: https://github.com/apache/rocketmq/issues/5376
BUG REPORT
- Please describe the issue you observed
Broker version: 5.0.0
After broker param timerMaxDelaySec set to 2592000(30 days),
sending delay message with custom delivery time
<code>setDeliverTimeMs</code> will get a MQBrokerException with errorMessage
> CODE: 13 DESC: timer message illegal, the delay time should not be bigger
than the max delay -1702967296ms; or if set del msg, the delay time should be
bigger than the current time BROKER: ip:port.
- What is expected to see?
Delay message with custom delivery time send successfully without any
exception or errorMessage.
- Other information (e.g. detailed explanation, logs, related issues,
suggestions on how to fix, etc):
Code in org.apache.rocketmq.broker.util.HookUtils#transformTimerMessage.
<img width="1101" alt="image"
src="https://user-images.githubusercontent.com/34431968/197096043-be69c1cc-6439-4b4d-88c3-8ec3f5a3df8a.png">
When timerMaxDelaySec set to number larger than 2147483, timerMaxDelaySec *
1000 will overflow to negative number, thus <code>deliverMs -
System.currentTimeMillis() >
brokerController.getMessageStoreConfig().getTimerMaxDelaySec() * 1000</code>
will always be true, and message send with custom delivery time will always get
a MQBrokerException with errorMessage as above.
Is this a bug? or timerMaxDelaySec is not expected to be set to number
this large?
If it's a bug, `timerMaxDelaySec * 1000` -> `timerMaxDelaySec * 1000L`
should fix this, and i'd like to submit a pr to fix this.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]