[Bug] Proxy remoting heartbeat should reject empty request bodies
- Dominant language
- Java
- Stars
- 22.6k
- Forks
- 12k
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 27
Description
### What happened?
`ClientManagerActivity.heartBeat` decodes the remoting request body with `HeartbeatData.decode(request.getBody(), HeartbeatData.class)` and immediately dereferences the result. `RemotingSerializable.decode` returns `null` for a null body, so a malformed `HEART_BEAT` request without a body can hit a `NullPointerException` and be reported as an internal proxy error.
### Why this matters
The Proxy client-management path is part of the Studio/Proxy Admin foundation. Malformed client heartbeat frames should be rejected with a clear response code and remark instead of surfacing as an internal exception.
### Expected behavior
Proxy should return a deterministic `INVALID_PARAMETER` response for empty or undecodable heartbeat bodies and must not register producer or consumer channels for that request.
### Scope
RocketMQ Studio track 2 / Proxy client management hardening.
Contributor guide
Research direction
Start at ClientManagerActivity.heartBeat and trace how HeartbeatData.decode and RemotingSerializable.decode handle empty or undecodable request bodies. Add or update coverage for malformed HEART_BEAT requests, then verify the response is INVALID_PARAMETER and that no producer or consumer channel is registered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100