ai-yang opened a new pull request, #10697:
URL: https://github.com/apache/rocketmq/pull/10697
### Which Issue(s) This PR Fixes
- Fixes #10696
### Brief Description
The asynchronous request-reply overloads register a `RequestResponseFuture`
before invoking the underlying send method. When send initiation throws
synchronously, the exception reaches the caller but the future remains in
`RequestFutureHolder` until timeout processing, which retains request state and
can deliver a callback after the synchronous failure.
This change:
- removes the exact registered future when `sendDefaultImpl`,
`sendSelectImpl`, or `sendKernelImpl` does not return normally;
- uses `remove(correlationId, requestResponseFuture)` so a concurrent
replacement under the same key is not removed;
- preserves the future after a normal asynchronous handoff so reply,
send-failure, and timeout paths continue to own completion;
- updates the existing synchronous-exception test semantics and adds
regression coverage for the default, selector, and explicit-queue callback
overloads.
### How Did You Test This Change?
Verified on 2026-09-11 at head `e340eb4d4b1372d04c9cdf3c57799a6c9724662e`,
rebased onto `develop` at `1a50c6e4e35524ac22055b76fc0ff2a6d3cff99f`, using JDK
8 and Maven 3.8.1:
```bash
mvn -pl client -am -DskipITs \
-Dtest=DefaultMQProducerTest,DefaultMQProducerImplTest \
-Dsurefire.failIfNoSpecifiedTests=false clean test
```
- `DefaultMQProducerTest`: 41 tests passed.
- `DefaultMQProducerImplTest`: 37 tests passed.
- Total: 78 tests, 0 failures, 0 errors, 0 skips; all 4 reactor modules
succeeded.
- Checkstyle: 0 violations; SpotBugs: 0 bug instances and 0 errors.
- `git diff --check`: passed.
The new regression assertion was previously verified to fail before the
production fix because the correlation ID remained in `requestFutureTable`.
Earlier full-client reactor evidence (995 tests, 0 failures/errors, 1 skip)
predates this rebase; the latest local run above is targeted, and the full CI
matrix has been triggered for the refreshed head.
--
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]