apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
29.07k stars 10.2k forks source link

springboot dubbo动态切换注册中心问题 #3703

Closed yxiaozhou closed 3 years ago

yxiaozhou commented 3 years ago

描述bug

我们在使用springboot(2.1.6) + dubbo(2.5.3) +zookeeper,参考了apollo-use-cases中dynamic-datasource的操作,但是这里有个疑问就是我执行了 this.applicationContext.publishEvent(new EnvironmentChangeEvent(changedKeys)); 操作后 如何去重连zk呢,因为使用的是第三方的jar包

        <groupId>com.alibaba.spring.boot</groupId>
        <artifactId>dubbo-spring-boot-starter</artifactId>

, 是需要修改三方jar包里的链接操作么;

而且类似的中间件都有类似的问题 比如rabbitmq的spring-boot-starter-amqp的jar包 image

nobodyiam commented 3 years ago

apollo 提供的是运行时动态推送配置的能力,实际如何切换数据库、注册中心、MQ 取决于对应中间件 SDK 的实现,数据库这个由于抽象比较好(datasource),所以我们提供了样例代码,其它的场景建议咨询下各自的开源社区,比如 dubbo + zk,建议在 dubbo 项目中讨论下,如果方案可行的话,也希望能提交样例代码到 apollo-use-cases 项目中,造福社区~

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

stale[bot] commented 3 years ago

This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.