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

   ### Before Creating the Enhancement Request
   
   - [X] I have confirmed that this should be classified as an enhancement 
rather than a bug/feature.
   
   
   ### Summary
   
   ClientConfig#getNamesrvAddr()
   
   ```java
       public String getNamesrvAddr() {
           if (StringUtils.isNotEmpty(namesrvAddr) && 
NameServerAddressUtils.NAMESRV_ENDPOINT_PATTERN.matcher(namesrvAddr.trim()).matches())
 {
               return 
NameServerAddressUtils.getNameSrvAddrFromNamesrvEndpoint(namesrvAddr);
           }
           return namesrvAddr;
       }
   ```
   If the format is "http://xxx.xx.xx:9876; " with a space after it, 2 
addresses will be parsed out;
   1. xxx.xx.xx:9876
   2. Empty string.
   
   如果格式为"http://xxx.xx.xx:9876; " 后面带有空格的时候,会解析出来2个地址;
   1. xxx.xx.xx:9876
   2. 空串。
   
   解析的时候 可以把nameAddr处理一下
   
   When parsing, you can handle nameAddr
   
   ```java
   
       public String getNamesrvAddr() {
           if (StringUtils.isNotEmpty(namesrvAddr) && 
NameServerAddressUtils.NAMESRV_ENDPOINT_PATTERN.matcher(namesrvAddr.trim()).matches())
 {
               return 
NameServerAddressUtils.getNameSrvAddrFromNamesrvEndpoint(namesrvAddr.trim());
           }
           return namesrvAddr;
       }
   
   ```
   
   
   
   
   ### Motivation
   
   .
   
   ### Describe the Solution You'd Like
   
   .
   
   ### Describe Alternatives You've Considered
   
   .
   
   ### Additional Context
   
   _No response_


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