You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "flystar32 (GitHub)" <gi...@apache.org> on 2018/12/27 12:00:29 UTC

[GitHub] [incubator-dubbo] flystar32 opened issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

### Environment

* Dubbo version: 2.6.2
* Operating System version: Mac OS
* Java version: java8

### Steps to reproduce this issue

1. start a provider A which registry to zookeeper
2. start an other provider B which provide the same service(interface) and  registry to Redis
3. start a consumer which subscribe service from both zookeeper and Redis
4. consumer can only consume the provider A which registered to zookeeper.
5. shut down the provider A, and then consumer can consume provider B.

### Expected Result

in step 4, consumer can consume both provider A and provider B.

so, can Dubbo support aggregation when subscribe service from more than one Registry Server ?

In addition, how to assign the subscribe priority of two Registry Servers?


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


[GitHub] [incubator-dubbo] flystar32 commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "flystar32 (GitHub)" <gi...@apache.org>.
@chickenlj @mercyblitz @ralf0131  Any suggestions for this issue ?

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


[GitHub] [incubator-dubbo] beiwei30 closed issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

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

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
I think u can impl a new Registry which will subscribe and registry to multi registration center.

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


[GitHub] [incubator-dubbo] carryxyh commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
I personally think that the use of this method is very limited.
If you have special needs, it is recommended to implement your own registration center.

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


[GitHub] [incubator-dubbo] zonghaishang commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "zonghaishang (GitHub)" <gi...@apache.org>.
@flystar32 
1.  dubbo支持多注册,多消费
可以将你们的Provider为每个注册中心都注册一份数据,消费方消费多个注册中心服务,目前dubbo是按照配置注册中心的循序进行消费,比如是配置了redis, zk注册中心,优先消费redis服务,如果redis没有服务会自动去消费zk服务

2. 这个和注册中心实现没有关系, 有2中方法可以支持你的需求:
a. org.apache.dubbo.config.ReferenceConfig#createProxy
AvailableCluster 默认是根据配置循序消费注册中心数据
b. 你可以实现一个路由Router,多个注册中心在运行时动态决定消费哪个注册中心服务

Google translation:

Dubbo supports multiple registrations, more consumption
You can register your Provider for each registration center, and the consumer consumes multiple registration center services. Currently, dubbo is consumed according to the configuration registration center. For example, redis, zk registration center, priority consumption redis Service, if redis no service will automatically consume zk service

This has nothing to do with the registry implementation. There are 2 ways to support your needs:
a. org.apache.dubbo.config.ReferenceConfig#createProxy
AvailableCluster defaults to consuming registry data sequentially according to configuration
b. You can implement a routing router, and multiple registries dynamically determine which registrar service to consume at runtime.

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

[GitHub] [incubator-dubbo] zonghaishang commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "zonghaishang (GitHub)" <gi...@apache.org>.
@flystar32 
1.  dubbo支持多注册,多消费
可以将你们的Provider为每个注册中心都注册一份数据,消费方消费多个注册中心服务,目前dubbo是按照配置注册中心的循序进行消费,比如是配置了redis, zk注册中心,优先消费redis服务,如果redis没有服务会自动去消费zk服务

2. 这个和注册中心实现没有关系, 有2中方法可以支持你的需求:
a. org.apache.dubbo.config.ReferenceConfig#createProxy
AvailableCluster 默认是根据配置循序消费注册中心数据
b. 你可以实现一个路由Router,多个注册中心在运行时动态决定消费哪个注册中心服务

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

[GitHub] [incubator-dubbo] zonghaishang commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "zonghaishang (GitHub)" <gi...@apache.org>.
@flystar32 
1.  dubbo支持多注册,多消费
可以将你们的Provider为每个注册中心都注册一份数据,消费方消费多个注册中心服务,目前dubbo是按照配置注册中心的循序进行消费,比如是配置了redis, zk注册中心,优先消费redis服务,如果redis没有服务会自动去消费zk服务

2. 这个和注册中心实现没有关系, 有2中方法可以支持你的需求:
a. org.apache.dubbo.config.ReferenceConfig#createProxy
AvailableCluster 默认是根据配置循序消费注册中心数据

b. 你可以实现一个路由Router,多个注册中心在运行时动态决定消费哪个注册中心服务

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

[GitHub] [incubator-dubbo] zonghaishang commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "zonghaishang (GitHub)" <gi...@apache.org>.
@flystar32 
1.  dubbo支持多注册,多消费
可以将你们的Provider为每个注册中心都注册一份数据,消费方消费多个注册中心服务,目前dubbo是按照配置注册中心的循序进行消费,比如是配置了redis, zk注册中心,优先消费redis服务,如果redis没有服务会自动去消费zk服务

2. 这个和注册中心实现没有关系, 有2中方法可以支持你的需求:
a. org.apache.dubbo.config.ReferenceConfig#createProxy
AvailableCluster 默认是根据配置顺序消费注册中心数据,可以实现新的Cluster决定消费策略
b. 你可以实现一个路由Router,多个注册中心在运行时动态决定消费哪个注册中心服务

Google translation:

Dubbo supports multiple registrations, more consumption
You can register your Provider for each registration center, and the consumer consumes multiple registration center services. Currently, dubbo is consumed according to the configuration registration center. For example, redis, zk registration center, priority consumption redis Service, if redis no service will automatically consume zk service

This has nothing to do with the registry implementation. There are 2 ways to support your needs:
a. org.apache.dubbo.config.ReferenceConfig#createProxy
AvailableCluster defaults to consuming registry data sequentially according to configuration
b. You can implement a routing router, and multiple registries dynamically determine which registrar service to consume at runtime.

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

[GitHub] [incubator-dubbo] flystar32 commented on issue #3084: Can Dubbo support aggregation when subscribe service from more than one Registry Server ? for example, ZK and Redis.

Posted by "flystar32 (GitHub)" <gi...@apache.org>.
A project has many applications, and they communication each other via dubbo RPC. 
Anyone who want to migration this project's dubbo registration center smoothy will need this feature.
For example, migration registration center from redis to zookeeper without stop the full Project.

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