rocketmq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From duhengfore...@apache.org
Subject [rocketmq] branch develop updated: Set auto commit (#914)
Date Thu, 11 Jul 2019 10:47:45 GMT
This is an automated email from the ASF dual-hosted git repository.

duhengforever pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5b29b73  Set auto commit (#914)
5b29b73 is described below

commit 5b29b73cc8a10b24caf7bfb9317e0399555a6e58
Author: ymwneu <ymwneu@126.com>
AuthorDate: Thu Jul 11 18:47:40 2019 +0800

    Set auto commit (#914)
---
 .../main/java/org/apache/rocketmq/example/ordermessage/Consumer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/example/src/main/java/org/apache/rocketmq/example/ordermessage/Consumer.java
b/example/src/main/java/org/apache/rocketmq/example/ordermessage/Consumer.java
index abb274d..3304de3 100644
--- a/example/src/main/java/org/apache/rocketmq/example/ordermessage/Consumer.java
+++ b/example/src/main/java/org/apache/rocketmq/example/ordermessage/Consumer.java
@@ -40,7 +40,7 @@ public class Consumer {
 
             @Override
             public ConsumeOrderlyStatus consumeMessage(List<MessageExt> msgs, ConsumeOrderlyContext
context) {
-                context.setAutoCommit(false);
+                context.setAutoCommit(true);
                 System.out.printf("%s Receive New Messages: %s %n", Thread.currentThread().getName(),
msgs);
                 this.consumeTimes.incrementAndGet();
                 if ((this.consumeTimes.get() % 2) == 0) {


Mime
View raw message