Aias00 opened a new issue, #10774: URL: https://github.com/apache/rocketmq/issues/10774
### Problem `ProducerProcessor#sendMessage` reads the first message before validating the request payload: ```java Message message = messageList.get(0); ``` `buildSendMessageRequestHeader` also reads `messageList.get(0)`. If an internal caller passes a null or empty message list, the method fails with a raw `NullPointerException` or `IndexOutOfBoundsException` instead of a controlled proxy error. ### Expected behavior `sendMessage` should validate `messageList` before reading the first message and complete the returned future exceptionally with a `ProxyException` that has a clear message. ### Impact Malformed send requests are harder to diagnose because they surface as generic collection exceptions rather than proxy-level validation failures. ### Suggested fix - Add an early null/empty guard in `sendMessage`. - Return a `ProxyException` with a clear message such as `message list is empty`. - Add regression coverage for an empty message list. -- 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]
