You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "dongdongqin (GitHub)" <gi...@apache.org> on 2019/03/22 07:00:18 UTC

[GitHub] [incubator-dubbo-spring-boot-project] dongdongqin opened issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

dubbo.registries.shanghai.address=zookeeper://10.157.151.40:2181
dubbo.registries.beijing.address=zookeeper://10.157.151.198:2181

@Reference(version = "1.0.0", registry = "zk1-shanghai")
    private BroadCastDemoService intlHelloService;
@EnableDubbo(multipleConfig = true)
The above configuration does not work. dubbo consumer does not check registry by id, and filter other registry.

However, the dubbo provider is fine with configuration above.
please help!

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] dongdongqin commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "dongdongqin (GitHub)" <gi...@apache.org>.
@mercyblitz, i know what your mean. If i type wrong name beans,  springboot dubbo does not have any error.  The default registry center  will be used.
 please see my #473, i have code in github.  
thanks a lot!


[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
@dongdongqin `@Reference#registry()` is a String array attribute, you can specify two bean names there.

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
`registry` attribute has to associate with a bean name, like "shanghai" or "beijing". However, Provider will registry both if @Service dost not specify.

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] dongdongqin commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "dongdongqin (GitHub)" <gi...@apache.org>.
> Consumer's `@Reference#registry()` attribute has to associate with a bean name, like "shanghai" or "beijing". However, Provider will registry both if @service dost not specify.

Thank your for your response.
yes, you are right. However, do you know how can i configure to let  Consumer's `@Reference#registry()` attribute  associated with a bean name, like "shanghai" or "beijing" ?

Because i have requirement, i need to consumer specific zookeeper center!
Hope your response!

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
Consumer's `@Reference#registry()` attribute has to associate with a bean name, like "shanghai" or "beijing". However, Provider will registry both if @Service dost not specify.

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] dongdongqin commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "dongdongqin (GitHub)" <gi...@apache.org>.
For example:
dubbo xml,
  <dubbo:registry id="chinaRegistry" address="zookeeper://10.157.151.40:2181" />
    <dubbo:registry id="intlRegistry" address="zookeeper://10.157.151.198:2181" />

    <dubbo:reference id="chinaHelloService" interface="com.mastercard.api.service.BroadCastDemoService" version="1.0.0" cluster="broadcast" registry="chinaRegistry" />
    <dubbo:reference id="intlHelloService" interface="com.mastercard.api.service.BroadCastDemoService" version="1.0.0" cluster="broadcast" registry="intlRegistry" />


>From the above configuration,  intlHelloService service only can consume  intlRegistry  register center.

How springboot do like these mentioned above?
thanks !

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz commented on issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
@dongdongqin `@Reference#registry()` is a String array attribute, you can specify two bean names in there.

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo-spring-boot-project] mercyblitz closed issue #472: springboot dubbo consumer, @reference with the registry, multi registries does not work.(多注册中心,在springboot dubbo consumer 端失败)

Posted by "mercyblitz (GitHub)" <gi...@apache.org>.
[ issue closed by mercyblitz ]

[ Full content available at: https://github.com/apache/incubator-dubbo-spring-boot-project/issues/472 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org