f1amingo opened a new pull request, #1352:
URL: https://github.com/apache/rocketmq-clients/pull/1352
### Summary
`createDuration(ms)` sets `Duration.seconds` to `ms / 1000` without flooring.
`Duration.seconds` is int64, so any non-whole-second `ms` (e.g. 2173) makes
serialization throw `Assertion failed` before the RPC leaves the client.
In the SUSPEND path, `ProcessQueue#changeInvisibleDuration` swallows the
error
and retries the same invalid duration every second: the RPC never reaches the
broker, the message hangs, and nothing is logged. All `createDuration` call
sites are affected (invisible duration, long-polling and request timeouts).
### Changes
- `createDuration()`: floor seconds; nanos already carry the remainder
- `ProcessQueue`: log the swallowed exception before retrying
- `ConsumeResultSuspend.of()`: reject non-integer ms (also NaN/Infinity)
- Unit tests: `createDuration(2173)` serializes as `(2s, 173000000ns)`;
suspend accepts 2173, rejects 100.5/NaN
### How Did You Test This Change?
Unit tests in `test/util/index.test.ts` (the original repro
`createDuration(2173).serializeBinary()`) and
`test/consumer/ConsumeResult.test.ts`. Whole-second values are unaffected.
--
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]