haiyang1985 opened a new issue #1950: How to set classifier for provider url?
URL: https://github.com/apache/incubator-dubbo/issues/1950
 
 
   Hi,
   
   To support provider dynamic configuration, override url will be notified to 
provider(RegistryProtocol). AbstractRegistry will firstly check override url's 
classifier match with provider url's classifier or not. **What is 
CLASSIFIER_KEY stands for? And, how can i configure it for the provider?** 
   
   **The AbstractRegistry will check the url match or not.**
   protected void notify(List<URL> urls) {
        ...
       for (Map.Entry<URL, Set<NotifyListener>> entry : 
getSubscribed().entrySet()) {
           if (!UrlUtils.isMatch(url, urls.get(0))) {
               continue;
           }
           ...
       }
   }
   
   **The classifier is one of the matcher for UrlUtils.java.**
   public static boolean isMatch(URL consumerUrl, URL providerUrl) {
       String consumerClassifier = 
consumerUrl.getParameter(Constants.CLASSIFIER_KEY, Constants.ANY_VALUE);
       String providerClassifier = 
providerUrl.getParameter(Constants.CLASSIFIER_KEY, Constants.ANY_VALUE);
       ...
   }
   
   I cannot find the classifier from the ServiceConfig/ProviderConfig. Also, 
only UrlUtils.java refers the   CLASSIFIER_KEY constants key. Where and how to 
set it for provider url?
   
   Thanks for any help.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to