You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/09/11 07:12:53 UTC
[PR] fix(broker): tolerate non-numeric TIMER_OUT_MS when attaching recall handle [rocketmq]
zjncs opened a new pull request, #11143:
URL: https://github.com/apache/rocketmq/pull/11143
### Motivation
`attachRecallHandle` parsed the client-visible `TIMER_OUT_MS` property with `Long.parseLong` before `doResponse` in the async send path. A message carrying a non-numeric value threw `NumberFormatException`, so the send response was never written and the client hung until its own timeout.
### Modifications
Parse with `NumberUtils.toLong` and skip building the recall handle when the value is not a non-negative number, mirroring the guard already used in `RecallMessageProcessor`.
### Verification
Fail-before (new test, run against the unpatched code):
```
SendMessageProcessorTest#testAttachRecallHandle_invalidTimestamp
java.lang.NumberFormatException: For input string: "not-a-timestamp"
at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
(thrown from SendMessageProcessor.attachRecallHandle before the response was written)
```
Pass-after:
```
Tests run: 17, Failures: 0, Errors: 0, Skipped: 0 -- SendMessageProcessorTest
```
--
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-unsubscribe@rocketmq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org