RockteMQ-AI commented on issue #1340: URL: https://github.com/apache/rocketmq-clients/issues/1340#issuecomment-5556535939
**Issue Evaluation** Category: `bug` | Status: **Confirmed** Verified against `java/client/src/main/java/org/apache/rocketmq/client/java/impl/consumer/ProcessQueueImpl.java`: - **Line 218-220**: When `isCacheFull()` returns true, `receiveMessageLater(RECEIVING_BACKOFF_DELAY_WHEN_CACHE_IS_FULL, attemptId)` is called with a fixed delay. - **Line 188-193**: `receiveMessageLater` schedules via `scheduler.schedule(...)` with the full delay duration. - **Line 145**: `cacheFullNanoTime` tracks when cache became full, but the backoff delay is not reduced even when the cache drains before the delay expires. **Root Cause:** The cache-full backoff uses a fixed delay (`RECEIVING_BACKOFF_DELAY_WHEN_CACHE_IS_FULL`) regardless of whether the cache drains during the wait. The consumer waits the full backoff period even when messages could be received sooner. **Impact:** Medium — unnecessary latency spikes when the cache drains quickly but the consumer is still in backoff. **Severity:** Medium — performance degradation, not correctness. **Fix direction:** Check if cache is still full before applying the full backoff, or use a shorter initial delay with exponential backoff that resets when cache drains. An automated fix proposal will be generated. Reply `/approve` to proceed with PR generation. --- *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]
