Aias00 opened a new pull request, #10684:
URL: https://github.com/apache/rocketmq/pull/10684

   ### Which Issue(s) This PR Fixes
   
   Fixes #10683
   
   ### Brief Description
   
   `GrpcClientSettingsManager.mergeMetric` previously parsed 
`metricCollectorAddress` with `split(":")` and directly read `split[1]`. When 
`metricCollectorMode=on` but the configured address was empty, missing a port, 
or using a non-numeric port, the gRPC client settings path could throw a 
runtime exception while constructing the client metric endpoint.
   
   This PR validates the configured collector address before building the 
endpoint. Invalid addresses now disable the client metric collector for the 
settings response and log a warning, while valid `host:port` values keep the 
existing behavior.
   
   ### How Did You Test This Change?
   
   ```bash
   mvn -pl proxy -Dtest=GrpcClientSettingsManagerTest -DfailIfNoTests=false test
   ```
   
   Result: `BUILD SUCCESS`, `Tests run: 9, Failures: 0, Errors: 0, Skipped: 0`.
   


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