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

   ## Problem
   
   `GrpcClientSettingsManager.mergeMetric(...)` parses the configured metric 
collector address with a raw split:
   
   ```java
   String[] split = metricCollectorAddress.split(":");
   String host = split[0];
   int port = Integer.parseInt(split[1]);
   ```
   
   When `metricCollectorMode=on` but `metricCollectorAddress` is blank or 
malformed, the settings merge path can throw `ArrayIndexOutOfBoundsException` 
or `NumberFormatException`. That can break gRPC client settings generation 
instead of returning a controlled metric setting.
   
   ## Expected behavior
   
   Proxy should not fail client settings merge because of an invalid optional 
metric collector address. It should validate the address, log a clear warning, 
and disable metric collection for that settings response when the address 
cannot be parsed.
   
   ## Scope
   
   Track 2 / Proxy gRPC client diagnostics and robustness. This only hardens 
metric endpoint parsing in gRPC client settings and should not change valid 
`host:port` handling.
   
   ## Evidence
   
   - 
`proxy/src/main/java/org/apache/rocketmq/proxy/grpc/v2/common/GrpcClientSettingsManager.java`
   - `mergeMetric(...)` reads `metricCollectorAddress.split(":")` and indexes 
`split[1]` without validation.
   


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