Aias00 opened a new issue, #10808:
URL: https://github.com/apache/rocketmq/issues/10808

   ### Problem
   `ProxyConfig.parseDelayLevel()` parses `messageDelayLevel` with `split(" 
")`. If the configuration contains leading spaces, repeated spaces, tabs, or 
line breaks, the parser emits empty or combined tokens, throws, and leaves 
`delayLevelTable` partially populated or empty.
   
   ```java
   String[] levelArray = levelString.split(" ");
   for (int i = 0; i < levelArray.length; i++) {
       String value = levelArray[i];
       ...
   }
   ```
   
   `messageDelayLevel` is a user-facing configuration and should tolerate 
ordinary whitespace formatting, especially in config files.
   
   ### Impact
   Malformed whitespace can make delayed-message level computation incomplete 
in Proxy. In the worst case, a blank/whitespace-only value leaves the table 
empty and later `computeDelayLevel()` can fail when reading the last level.
   
   ### Expected behavior
   Proxy should trim the config and split by `\s+`, ignore blank input safely, 
and keep valid delay levels when the same values are formatted with extra 
whitespace.
   
   ### Code evidence
   - `proxy/src/main/java/org/apache/rocketmq/proxy/config/ProxyConfig.java`
   
   ### Suggested fix
   Use whitespace-normalized parsing in `parseDelayLevel()` and add 
`ProxyConfig` tests for repeated whitespace / blank input.
   


-- 
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