rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jinrongt...@apache.org
Subject [rocketmq] 04/22: fix(PullConsumer) fix the namespace issue of pull consumer's consumerGroup
Date Mon, 20 Jan 2020 13:25:37 GMT
This is an automated email from the ASF dual-hosted git repository.

jinrongtong pushed a commit to branch test-release
in repository https://gitbox.apache.org/repos/asf/rocketmq.git

commit 4460417d3f2972ea1bfc09e7668717085b82e954
Author: duhenglucky <duhengforever@apache.org>
AuthorDate: Tue Nov 26 11:28:33 2019 +0800

    fix(PullConsumer) fix the namespace issue of pull consumer's consumerGroup
---
 .../apache/rocketmq/client/consumer/DefaultLitePullConsumer.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumer.java
b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumer.java
index 09f7e20..52060ea 100644
--- a/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumer.java
+++ b/client/src/main/java/org/apache/rocketmq/client/consumer/DefaultLitePullConsumer.java
@@ -26,6 +26,7 @@ import org.apache.rocketmq.client.impl.consumer.DefaultLitePullConsumerImpl;
 import org.apache.rocketmq.common.MixAll;
 import org.apache.rocketmq.common.message.MessageExt;
 import org.apache.rocketmq.common.message.MessageQueue;
+import org.apache.rocketmq.common.protocol.NamespaceUtil;
 import org.apache.rocketmq.common.protocol.heartbeat.MessageModel;
 import org.apache.rocketmq.remoting.RPCHook;
 
@@ -186,6 +187,7 @@ public class DefaultLitePullConsumer extends ClientConfig implements LitePullCon
 
     @Override
     public void start() throws MQClientException {
+        setConsumerGroup(NamespaceUtil.wrapNamespace(this.getNamespace(), this.consumerGroup));
         this.defaultLitePullConsumerImpl.start();
     }
 
@@ -425,4 +427,8 @@ public class DefaultLitePullConsumer extends ClientConfig implements LitePullCon
     public void setTopicMetadataCheckIntervalMillis(long topicMetadataCheckIntervalMillis)
{
         this.topicMetadataCheckIntervalMillis = topicMetadataCheckIntervalMillis;
     }
+
+    public void setConsumerGroup(String consumerGroup) {
+        this.consumerGroup = consumerGroup;
+    }
 }


Mime
View raw message