haoyann commented on a change in pull request #8782:
URL: https://github.com/apache/dubbo/pull/8782#discussion_r711415832



##########
File path: 
dubbo-registry/dubbo-registry-nacos/src/main/java/org/apache/dubbo/registry/nacos/NacosRegistry.java
##########
@@ -228,12 +229,19 @@ private void doSubscribe(final URL url, final 
NotifyListener listener, final Set
                     subscribeEventListener(serviceName, url, listener);
                 }
             } else {
-                List<Instance> instances = new LinkedList<>();
                 for (String serviceName : serviceNames) {
+                    List<Instance> instances = new LinkedList<>();
                     instances.addAll(namingService.getAllInstances(serviceName
                         , getUrl().getGroup(Constants.DEFAULT_GROUP)));
-                    notifySubscriber(url, listener, instances);
-                    subscribeEventListener(serviceName, url, listener);
+                    String serviceInterface = serviceName;
+                    String[] segments = 
serviceName.split(SERVICE_NAME_SEPARATOR, -1);
+                    if (segments.length == 4) {
+                        serviceInterface = segments[SERVICE_INTERFACE_INDEX];
+                    }
+                    URL subscriberURL = 
url.setPath(serviceInterface).addParameters(INTERFACE_KEY, serviceInterface,
+                        CHECK_KEY, String.valueOf(false));

Review comment:
       I just keep in line with zookeeper. Because need to subscribe to all 
service,`check ` is false is better.
   
   
https://github.com/apache/dubbo/blob/bdd253f8eeea0e256e2e037aa867b272de442625/dubbo-registry/dubbo-registry-zookeeper/src/main/java/org/apache/dubbo/registry/zookeeper/ZookeeperRegistry.java#L150-L151




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



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

Reply via email to