alibaba / spring-cloud-alibaba

Spring Cloud Alibaba provides a one-stop solution for application development for the distributed solutions of Alibaba middleware.
https://sca.aliyun.com
Apache License 2.0
27.91k stars 8.33k forks source link

dubbo.registry.subscribe=false will cause java.lang.IllegalStateException: No registry config found or it's not a valid config! #863

Open yubinnng opened 5 years ago

yubinnng commented 5 years ago

Which Component Dubbo Spring Cloud

Describe the bug when i config this:

dubbo:
  registry:
    subscribe: false

and then run application,will throw exception:

java.lang.IllegalStateException: No registry config found or it's not a valid config! The registry config is: <dubbo:registry subscribe="false" zookeeperProtocol="false" valid="false" prefix="dubbo.registry" />

Additional context 2.1.1.BUILD-SNAPSHOT MacOS Java8

tswstarplanet commented 5 years ago

In fact the set does not have any effect, because dubbo framework never use it.

yubinnng commented 5 years ago

In fact the set does not have any effect, because dubbo framework never use it.

Excuse, how can I set up a service that doesn‘t subscribe to others?

tswstarplanet commented 5 years ago

Now dubbo doesn't have the feature disabling subscribing service. Why do you need the feature ?

yubinnng commented 5 years ago

Sorry for the delay, because if i can't set up subscribe=false,the service doesn‘t subscribe to others report 'Current application will subscribe all services in registry, a lot of memory and CPU cycles may be used, thus it's strongly recommend you using the externalized property 'dubbo.cloud.subscribed-services' to specify the services'