You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "youngkermit8-coder (via GitHub)" <gi...@apache.org> on 2026/08/10 23:30:22 UTC

[I] [Studio][Bug] Validate oversized message bodies before starting producer [rocketmq-dashboard]

youngkermit8-coder opened a new issue, #1522:
URL: https://github.com/apache/rocketmq-dashboard/issues/1522

   ## Bug Report
   
   ### Runtime environment
   
   - Branch: `rocketmq-studio`
   - JDK: 21
   
   ### Description
   
   The oversized-message check added for #1443 currently runs only after
   `DefaultMQProducer.start()` succeeds. `sendMessage()` resolves the selected
   instance endpoint, constructs a producer, and connects to the NameServer before
   encoding and validating the request body.
   
   This makes validation of an invalid request depend on external infrastructure:
   
   - an unavailable or invalid NameServer can return a 500 before the expected 400;
   - oversized requests still create and start a short-lived producer;
   - the broker connection and shutdown work is unnecessary because the message can
     never be sent.
   
   ### Steps to reproduce
   
   1. Configure an unavailable NameServer endpoint.
   2. Call `POST /api/topics/send` with a UTF-8 body larger than 4 MiB.
   3. Observe that the producer startup fails before the body-size validation runs.
   
   ### Expected behavior
   
   Encode and validate the body before resolving an instance endpoint or creating a
   producer. A body larger than 4 MiB should deterministically return a 400 without
   performing any network or producer operation.
   
   ### Proposed fix
   
   - Move request field extraction and UTF-8 body-size validation to the beginning
     of `RocketMQAdminClientImpl.sendMessage()`.
   - Add regression coverage proving an oversized multibyte body is rejected before
     endpoint resolution or producer construction.
   - Keep exactly 4 MiB valid so the existing limit remains inclusive.
   
   


-- 
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: commits-unsubscribe@rocketmq.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Validate oversized message bodies before starting producer [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #1522:
URL: https://github.com/apache/rocketmq-dashboard/issues/1522#issuecomment-5321754194

   This issue has been automatically closed because there has been no activity for 7 days. If you believe this issue is still relevant, please reopen it with updated information.


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Validate oversized message bodies before starting producer [rocketmq-dashboard]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #1522: [Studio][Bug] Validate oversized message bodies before starting producer
URL: https://github.com/apache/rocketmq-dashboard/issues/1522


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Studio][Bug] Validate oversized message bodies before starting producer [rocketmq-dashboard]

Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org