Skip to content

Commit

Permalink
Set auto commit (alibaba#914)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymwneu authored and duhenglucky committed Jul 11, 2019
1 parent 92ec70b commit 5b29b73
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static void main(String[] args) throws MQClientException {

@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) {
Expand Down

0 comments on commit 5b29b73

Please sign in to comment.