RockteMQ-AI commented on issue #1309:
URL: 
https://github.com/apache/rocketmq-clients/issues/1309#issuecomment-5058748409

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   Both transport-resilience gaps have been verified against the current 
codebase.
   
   **Bug 1: gRPC `RESOURCE_EXHAUSTED` not recognized as throttling**
   - `StatusChecker.check()` only handles RocketMQ application-level `Code` 
enum values (e.g. `TOO_MANY_REQUESTS`). When a server/intermediary returns the 
canonical gRPC status `io.grpc.Status.RESOURCE_EXHAUSTED`, it surfaces as a 
`StatusRuntimeException` on the `ListenableFuture`, bypassing `StatusChecker` 
entirely.
   - `ProducerImpl.send0()` (line 563) checks `instanceof 
TooManyRequestsException` to decide between immediate retry vs. throttled 
backoff. Since `StatusRuntimeException` is not `TooManyRequestsException`, the 
client retries immediately — confirming the bug.
   - **Impact:** Producer retries without backoff under server-side gRPC-level 
throttling, potentially worsening load.
   
   **Bug 2: Half-open TCP connection reuse**
   - `RpcClientImpl` sets `keepAliveTime(300s)`, `keepAliveTimeout(30s)`, 
`keepAliveWithoutCalls(true)`.
   - `ClientImpl.doHeartbeat()` onFailure (line 613) only logs a warning. It 
does not signal the cached `ManagedChannel` to create a new transport or 
trigger reconnection.
   - Recovery relies solely on gRPC keepalive (5 min + 30s timeout), meaning 
silent packet loss causes prolonged failures.
   - **Impact:** Client may be stuck on a dead connection for up to 5.5 minutes.
   
   **Affected Components:** `StatusChecker.java`, `ProducerImpl.java`, 
`ClientImpl.java`, `RpcClientImpl.java`
   **Severity:** High — affects production reliability under network issues or 
server-side throttling.
   
   An automated fix proposal will be generated. Reply `/approve` to proceed 
with PR generation.
   
   ---
   *Automated evaluation by github-manager-bot*


-- 
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]

Reply via email to