nuoqin opened a new issue, #14266:
URL: https://github.com/apache/dubbo/issues/14266

   ### Pre-check
   
   - [X] I am sure that all the content I provide is in English.
   
   
   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dubbo/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache Dubbo Component
   
   Java SDK (apache/dubbo)
   
   ### Dubbo Version
   
   2.7.X/3.X
   
   ### Steps to reproduce this issue
   
   我们系统从alibaba dubbo 
2.6.X升级到2.7.X/3.X时,在使用ReferenceConfig,发现registryConfig.setCluster(ClusterRules.BROADCAST)时,发现在2.6.X版本是支持广播
   到其他服务器上的服务。但升级到2.7.X/3.X时,服务无法进行广播。
   
   2.6.X代码如下
   ```
   ReferenceConfig<CacheService> reference = new ReferenceConfig<>();
   RegistryConfig registryConfig = new RegistryConfig("zookeeper地址");
   **registryConfig.setCluster(ClusterRules.BROADCAST);**
   reference.setRegistry(registryConfig); 
   //设置ApplicationConfig
   reference.setApplication(application);
   reference.setInterface(CacheSyncService.class);
   
   CacheService service = reference.get();
   
   service.update();
   ```
   2.7.X/3.X代码确要
   ```
   ReferenceConfig<CacheService> reference = new ReferenceConfig<>();
   RegistryConfig registryConfig = new RegistryConfig("zookeeper地址");
   reference.setRegistry(registryConfig); 
   //设置ApplicationConfig
   reference.setApplication(application);
   reference.setInterface(CacheSyncService.class);
   **reference.setCluster(ClusterRules.BROADCAST);**
   
   CacheService service = reference.get();
   
   service.update();
   ```
   
   
   
   ### What you expected to happen
   
   服务不可用
   
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [X] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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