apache / apache/rocketmq

[Bug] Proxy remoting expired request cleanup silently swallows exceptions

Open Beginner friendly
#10,806 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
22.6k
Forks
12k
Avg merge
3d 1h
Merged PRs (30d)
27

Description

### Problem
`RemotingProtocolServer.cleanExpiredRequestInQueue` catches `Throwable` and ignores it while staying inside a `while (true)` cleanup loop. If queue inspection, task casting, or response cleanup repeatedly throws, the failure is invisible and the cleaner can keep looping without actionable diagnostics.

### Code evidence
- `proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java`: `cleanExpiredRequestInQueue` wraps the queue cleanup loop in `catch (Throwable ignored) {}`.

### Impact
Proxy operators lose the diagnostic signal for expired request cleanup failures. In the worst case, repeated exceptions can hide queue cleanup failure or cause avoidable loop churn, which works against Proxy Admin/runtime diagnostics and remoting observability.

### Expected behavior
The cleanup path should log a compact warning with queue context and stop the current cleanup pass after an unexpected exception, rather than swallowing the error silently.

### Scope
RocketMQ Studio track 2 / Proxy Admin runtime diagnostics and Proxy remoting observability.

Contributor guide

Open the contributing guide

Research direction

Read proxy/src/main/java/org/apache/rocketmq/proxy/remoting/RemotingProtocolServer.java, focusing on cleanExpiredRequestInQueue and its cleanup loop. Verify the unexpected-exception path emits a compact warning with queue context and ends the current cleanup pass instead of silently continuing; run the relevant proxy/remoting tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
distributed-systems, observability-sre
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.