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

lizhanhui pushed a commit to branch develop_oms_0.3.0
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop_oms_0.3.0 by this push:
     new 30abd95  Fix consume examples
30abd95 is described below

commit 30abd95e3039d089c3e8f11f4c268e503116c8ba
Author: shutian.lzh <shutian....@alibaba-inc.com>
AuthorDate: Sun Apr 15 17:38:07 2018 +0800

    Fix consume examples
---
 .../apache/rocketmq/example/openmessaging/SimplePullConsumer.java   | 6 +++---
 .../apache/rocketmq/example/openmessaging/SimplePushConsumer.java   | 6 +++---
 .../java/io/openmessaging/rocketmq/consumer/PullConsumerImpl.java   | 2 +-
 .../java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java   | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePullConsumer.java
 
b/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePullConsumer.java
index 56c3266..4ddf50f 100644
--- 
a/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePullConsumer.java
+++ 
b/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePullConsumer.java
@@ -19,16 +19,16 @@ package org.apache.rocketmq.example.openmessaging;
 import io.openmessaging.Message;
 import io.openmessaging.MessagingAccessPoint;
 import io.openmessaging.OMS;
+import io.openmessaging.OMSBuiltinKeys;
 import io.openmessaging.consumer.PullConsumer;
-import io.openmessaging.rocketmq.domain.NonStandardKeys;
 
 public class SimplePullConsumer {
     public static void main(String[] args) {
         final MessagingAccessPoint messagingAccessPoint =
-            
OMS.getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace");
+            
OMS.getMessagingAccessPoint("oms:rocketmq://localhost:9876/default:default");
 
         final PullConsumer consumer = messagingAccessPoint.createPullConsumer(
-            OMS.newKeyValue().put(NonStandardKeys.CONSUMER_GROUP, 
"OMS_CONSUMER"));
+            OMS.newKeyValue().put(OMSBuiltinKeys.CONSUMER_ID, "OMS_CONSUMER"));
 
         messagingAccessPoint.startup();
         System.out.printf("MessagingAccessPoint startup OK%n");
diff --git 
a/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePushConsumer.java
 
b/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePushConsumer.java
index 18b7a4c..220c132 100644
--- 
a/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePushConsumer.java
+++ 
b/example/src/main/java/org/apache/rocketmq/example/openmessaging/SimplePushConsumer.java
@@ -19,17 +19,17 @@ package org.apache.rocketmq.example.openmessaging;
 import io.openmessaging.Message;
 import io.openmessaging.MessagingAccessPoint;
 import io.openmessaging.OMS;
+import io.openmessaging.OMSBuiltinKeys;
 import io.openmessaging.consumer.MessageListener;
 import io.openmessaging.consumer.PushConsumer;
-import io.openmessaging.rocketmq.domain.NonStandardKeys;
 
 public class SimplePushConsumer {
     public static void main(String[] args) {
         final MessagingAccessPoint messagingAccessPoint = OMS
-            
.getMessagingAccessPoint("openmessaging:rocketmq://IP1:9876,IP2:9876/namespace");
+            
.getMessagingAccessPoint("oms:rocketmq://localhost:9876/default:default");
 
         final PushConsumer consumer = messagingAccessPoint.
-            
createPushConsumer(OMS.newKeyValue().put(NonStandardKeys.CONSUMER_GROUP, 
"OMS_CONSUMER"));
+            
createPushConsumer(OMS.newKeyValue().put(OMSBuiltinKeys.CONSUMER_ID, 
"OMS_CONSUMER"));
 
         messagingAccessPoint.startup();
         System.out.printf("MessagingAccessPoint startup OK%n");
diff --git 
a/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PullConsumerImpl.java
 
b/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PullConsumerImpl.java
index c5bd24c..8bc7a77 100644
--- 
a/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PullConsumerImpl.java
+++ 
b/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PullConsumerImpl.java
@@ -52,7 +52,7 @@ public class PullConsumerImpl implements PullConsumer {
         this.properties = properties;
         this.clientConfig = BeanUtils.populate(properties, ClientConfig.class);
 
-        String consumerGroup = clientConfig.getRmqConsumerGroup();
+        String consumerGroup = clientConfig.getOmsConsumerId();
         if (null == consumerGroup || consumerGroup.isEmpty()) {
             throw new OMSRuntimeException("-1", "Consumer Group is necessary 
for RocketMQ, please set it.");
         }
diff --git 
a/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java
 
b/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java
index 6c0f392..8910676 100644
--- 
a/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java
+++ 
b/openmessaging/src/main/java/io/openmessaging/rocketmq/consumer/PushConsumerImpl.java
@@ -58,7 +58,7 @@ public class PushConsumerImpl implements PushConsumer {
         }
         this.rocketmqPushConsumer.setNamesrvAddr(accessPoints.replace(',', 
';'));
 
-        String consumerGroup = clientConfig.getRmqConsumerGroup();
+        String consumerGroup = clientConfig.getOmsConsumerId();
         if (null == consumerGroup || consumerGroup.isEmpty()) {
             throw new OMSRuntimeException("-1", "Consumer Group is necessary 
for RocketMQ, please set it.");
         }

-- 
To stop receiving notification emails like this one, please contact
lizhan...@apache.org.

Reply via email to