jjj-n opened a new pull request, #1366: URL: https://github.com/apache/rocketmq-clients/pull/1366
### Which Issue(s) This PR Fixes Fixes #1323 ### Brief Description When a PushConsumer long poll returns `MESSAGE_NOT_FOUND`, the receive path skips `doAfter`, leaving the inflight request count incremented. As a result, graceful shutdown waits until the receive timeout even after those requests have completed. Invoke the receive completion hooks with `MessageHookPointsStatus_OK` for this normal empty-poll result, preserving the existing debug logging and retry behavior. Add a regression test that exercises the asynchronous receive path with a simulated response stream. It checks three consecutive empty polls, a successful empty response, a server error, and an RPC timeout, verifying balanced inflight counts, exactly one completion callback per request, the callback status, and the receive-wait outcome used by `GracefulStop`. ### How Did You Test This Change? Using Go 1.25.14 on Linux/amd64, from `golang`: - Before the fix: the new regression test failed in three consecutive runs only for `MESSAGE_NOT_FOUND`, with inflight counts of 1, 2, and 3 and a shutdown-wait timeout. - `go test -count=1 -timeout=5m ./...` - `go test -race -run '^TestProcessQueueReceiveCompletesInflightRequest$' -count=20 -timeout=3m .` The tests use a mocked client manager and response stream; no external broker is required. -- 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]
