You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2021/06/08 08:16:19 UTC

[dubbo] branch 2.6.x updated: Dubbo 2.6.x may not support multi group consumer (#7997)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/2.6.x by this push:
     new c5ed7de  Dubbo 2.6.x may not support multi group consumer (#7997)
c5ed7de is described below

commit c5ed7def80bd4cfc3898deef6e3dc9ffaf788318
Author: qixiaobo <qi...@gmail.com>
AuthorDate: Tue Jun 8 16:15:35 2021 +0800

    Dubbo 2.6.x may not support multi group consumer (#7997)
    
    fixes https://github.com/apache/dubbo/issues/7985
---
 .../java/com/alibaba/dubbo/rpc/cluster/support/ClusterUtils.java  | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/ClusterUtils.java b/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/ClusterUtils.java
index 7bc6f30..c36af7d 100644
--- a/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/ClusterUtils.java
+++ b/dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/support/ClusterUtils.java
@@ -71,6 +71,14 @@ public class ClusterUtils {
             if (dubbo != null && dubbo.length() > 0) {
                 map.put(Constants.DUBBO_VERSION_KEY, dubbo);
             }
+            String defaultVersion = remoteMap.get(Constants.DEFAULT_KEY_PREFIX + Constants.VERSION_KEY);
+            if (defaultVersion != null && defaultVersion.length() > 0) {
+                map.put(Constants.DEFAULT_KEY_PREFIX + Constants.VERSION_KEY, defaultVersion);
+            }
+            String defaultGroup = remoteMap.get(Constants.DEFAULT_KEY_PREFIX + Constants.GROUP_KEY);
+            if (defaultGroup != null && defaultGroup.length() > 0) {
+                map.put(Constants.DEFAULT_KEY_PREFIX + Constants.GROUP_KEY, defaultGroup);
+            }
             String version = remoteMap.get(Constants.VERSION_KEY);
             if (version != null && version.length() > 0) {
                 map.put(Constants.VERSION_KEY, version);