RockteMQ-AI commented on issue #1323: URL: https://github.com/apache/rocketmq-clients/issues/1323#issuecomment-5231192692
**Issue Evaluation** Category: `bug` | Status: **Confirmed** The reported issue has been analyzed and verified. **Root Cause:** In `process_queue.go`, when a PushConsumer receives `MESSAGE_NOT_FOUND` (long-polling expired with no new message), the `isNoNewMessage` branch only logs at debug level and does not call `cli.doAfter(MessageHookPoints_RECEIVE, ...)`. The inflight counter `inflightReceiveRequestCount` maintained by `defultInflightRequestCountInterceptor` is never decremented. **Impact:** `GracefulStop()` → `waitingReceiveRequestFinished()` can never observe a zero counter and always waits the full `requestTimeout + longPollingTimeout` (e.g. 23s). Every shutdown takes a fixed ~24s regardless of actual inflight requests. **Severity:** High — affects Go SDK production deployments with frequent restarts or rolling deployments. The leaked counter also means the inflight tracking is fundamentally broken for long-polling expiry paths. **Suggested Fix:** Ensure `cli.doAfter(MessageHookPoints_RECEIVE, ...)` is called in the `isNoNewMessage` branch to properly decrement the inflight counter. --- *Automated evaluation by RockteMQ-AI* -- 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]
