From 5b29b73cc8a10b24caf7bfb9317e0399555a6e58 Mon Sep 17 00:00:00 2001 From: ymwneu Date: Thu, 11 Jul 2019 18:47:40 +0800 Subject: [PATCH] Set auto commit (#914) --- .../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 abb274d6..3304de38 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 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) { -- GitLab