RockteMQ-AI commented on issue #11425:
URL: https://github.com/apache/rocketmq/issues/11425#issuecomment-6149783894

   **Issue Evaluation**
   
   Category: `type/bug` | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase.
   
   **Root Cause:** `BrokerOuterAPI.java:517` hardcodes 
`requestHeader.setCompressed(false)` while line 525 encodes the body with the 
real `compressed` flag (`requestBody.encode(compressed)`). When 
`compressedRegister=true`, the body is a zlib deflate stream but the header 
tells the name server it is plain JSON. The name server's 
`RegisterBrokerBody.decode()` then tries `JSON.parseObject` on binary data, 
which fails with `RemotingCommandException`.
   
   **Regression:** Commit `cad0cfcec` ("[RIP-32]Support Slave Acting Master 
mode") changed `setCompressed(compressed)` to `setCompressed(false)` but kept 
`encode(compressed)`, creating the flag/body mismatch.
   
   **Impact:** With `compressedRegister=true`, every broker registration fails 
against all name servers — the broker is never discoverable and clients lose 
routes. The default is `false`, so only opt-in deployments are affected. No 
tests cover the compressed path.
   
   **Severity:** High (config-gated but total failure when enabled)
   
   **Suggested Fix:** Change `BrokerOuterAPI.java:517` from 
`requestHeader.setCompressed(false)` to 
`requestHeader.setCompressed(compressed)`.
   
   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