RockteMQ-AI commented on issue #1522:
URL: 
https://github.com/apache/rocketmq-dashboard/issues/1522#issuecomment-5247473105

   **Issue Evaluation**
   
   Category:  | Status: **Confirmed**
   
   The reported issue has been verified against the current codebase on the  
branch.
   
   **Root Cause:** In  (line 320), the method resolves the NameServer endpoint 
() and calls  **before** extracting and validating the request body size (lines 
329–339). This means:
   1. An unavailable NameServer returns a 500 before the expected 400 for 
oversized bodies.
   2. A producer is unnecessarily created, started, and shut down for messages 
that can never be sent.
   3. The 4 MiB limit check () at line 335 is reached only after 
network-dependent operations.
   
   **Impact:**  API endpoint — all callers sending oversized messages receive 
misleading error codes and incur unnecessary broker connections.
   
   **Severity:** Medium — incorrect error behavior under edge conditions; no 
data loss or corruption.
   
   **Proposed fix aligns with the report:** Move field extraction and UTF-8 
body-size validation to the top of , before  resolution and producer 
construction.
   
   An automated fix proposal can be generated. Reply  to proceed with PR 
generation, or provide feedback to adjust the approach.
   
   ---
   *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