You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/08/26 06:58:21 UTC

[GitHub] [dubbo] wangxiang93 opened a new issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

wangxiang93 opened a new issue #8603:
URL: https://github.com/apache/dubbo/issues/8603


   * Dubbo version: 2.7.6
   * Operating System version: window/linux
   * Java version: JDK1.8
   
   dubbo服务引入多个注册中心(myZk and hisZk ),一个是自己系统的,另外一个是需要消费其他系统,现在服务均注册到两个注册中心去了,怎么样让服务只注册到默认的myZk,消费服务可消费MyZk的其他服务和HisZk提供的服务:
   代码如下
   dubbo:
     application:
       name: educate-service
       id:  educate-service
     provider:
       timeout: 30000
     registries:
       zkMy:
         address: zookeeper://localhost:2181
         timeout: 50000
         check: false
         default: true
       zkHis:
         address: zookeeper://localhost:2182
         timeout: 50000
         check: false
         default: false
     protocol:
       name: dubbo
       port: 20884
     consumer:
       timeout: 30000
       check: false
       retries: 0
       registries:
         my:
           address: zookeeper://localhost:2181
           default: true
           protocol: zookeeper
         his:
           address: zookeeper://localhost:2182
           protocol: zookeeper
   
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。
   
   我理解下来,你只需要在 B 模块配置多注册中心支持,是可能解决你的问题的。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。如果有可能话,建议使用 2.7.x 最新版本,可能是因为历史遗留 BUG 导致的问题。
   
   
   我理解下来,你只需要在 B 模块配置多注册中心支持,是可以解决你的问题的,假如部署架构如下:
   ```shell
   registry1: A, B, C
   registry2: D
   ```
   则可在 B 端配置:
   ```xml
   <!-- 为了引用服务 C,已经暴露自身服务给 A -->
   <dubbo:registry address="${registry1}" register="true"/>
   <!-- 为了引用服务 D -->
   <dubbo:registry address="${registry2}" register="false"/>
   ```
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。
   
   我理解下来,你只需要在 B 模块配置多注册中心支持,是可以解决你的问题的。
   
   如果有可能话,建议使用 2.7.x 最新版本,可能是因为历史遗留 BUG 导致的问题。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM commented on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
CrazyHZM commented on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-924793502


   @wangxiang93 The above answer should answer your question, temporarily close this issue, if you have other questions, you can reopen this issue.
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。
   
   我理解下来,你只需要在 B 模块配置多注册中心支持,是可以解决你的问题的。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] CrazyHZM closed issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
CrazyHZM closed issue #8603:
URL: https://github.com/apache/dubbo/issues/8603


   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] wangxiang93 commented on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
wangxiang93 commented on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-907992456


   > @wangxiang93 It may be helpful for you See: https://www.yuque.com/plusman/zaq57o/qhg0d1
   
   sorry,I thinks this way not workes  well for my reuest;
   
   我的核心诉求是这样的
   我们系统有A、B,C 三个模块 共用一个ZK,调用链:A -->B --->C ,其中B既作为提供者又作为消费者,当B要去消费其他系统如D,必然要引进D的zk消费其服务,我现在不想把我的服务(c的提供者)注册到D的ZK上,又想去订阅D的zk的其他服务。我借鉴了你的方法在D的zk上加上register =false(Whether to export service on the register center,不向D的zk上注册B的service服务),我通过看D的zk,发现B的service服务确实没注册上,但B的reference(消费者)服务节点注册到D上的(具体接口节点的consumer属性为空),更严重的是我要调D的zk的zk服务,**debug发现注册中心竟然还是B的注册中心(我已经指定了 @Reference(registry = "dZk")),导致没提供者啥报错啥的**


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn commented on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn commented on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-907008204


   @wangxiang93 It may be helpful for you  See: https://www.yuque.com/plusman/zaq57o/qhg0d1


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。如果有可能话,建议使用 2.7.x 最新版本,可能是因为历史遗留 BUG 导致的问题。
   
   
   我理解下来,你只需要在 B 模块配置多注册中心支持,是可以解决你的问题的,假如你的部署架构如下:
   ```shell
   registry1: A, B, C
   registry2: D
   ```
   则可在 B 端配置:
   ```xml
   <!-- 为了引用服务 C,以及暴露自身服务给 A -->
   <dubbo:registry address="${registry1}" register="true"/>
   <!-- 为了引用服务 D -->
   <dubbo:registry address="${registry2}" register="false"/>
   ```
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn edited a comment on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn edited a comment on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?方便的话,可以画个简单的用例图。如果有可能话,建议使用 2.7.x 最新版本,可能是因为历史遗留 BUG 导致的问题。
   
   
   我理解下来,你只需要在 B 模块配置多注册中心支持,是可以解决你的问题的,假如部署架构如下:
   ```shell
   registry1: A, B, C
   registry2: D
   ```
   则可在 B 端配置:
   ```xml
   <!-- 为了引用服务 C,以及暴露自身服务给 A -->
   <dubbo:registry address="${registry1}" register="true"/>
   <!-- 为了引用服务 D -->
   <dubbo:registry address="${registry2}" register="false"/>
   ```
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] plusmancn commented on issue #8603: 2.7.6.dubbo在指定的注册中心消费或者提供服务

Posted by GitBox <gi...@apache.org>.
plusmancn commented on issue #8603:
URL: https://github.com/apache/dubbo/issues/8603#issuecomment-908047161


   > 更严重的是我要调D的zk的zk服务
   
   @wangxiang93 请问这怎么理解?


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org