tju-yxq opened a new pull request, #1444: URL: https://github.com/apache/rocketmq-dashboard/pull/1444
## What is the purpose of the change Fixes #1443 `sendMessage()` did not validate body size before sending, causing HTTP 500 for messages exceeding the 4 MB broker limit. ## Brief changelog - **`RocketMQAdminClientImpl.java`**: Added `MAX_MESSAGE_SIZE` constant (4 MB) and a pre-send size check that throws `BusinessException(400)` with a clear message. ## Verifying this change 1. Send a message with body > 4 MB. 2. Before fix: HTTP 500 with confusing error. 3. After fix: HTTP 400 with "Message body size X exceeds the maximum of 4194304 bytes". - [x] Make sure there is a Github issue filed for the change. - [x] Format the pull request title like `[ISSUE #1443] ...`. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Write necessary unit-test to verify your logic correction. - [x] Run `mvn -B clean apache-rat:check findbugs:findbugs checkstyle:checkstyle` to make sure basic checks pass. - [ ] If this contribution is large, please file an Apache Individual Contributor License Agreement. -- 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]
