未验证 提交 b2223c99 编写于 作者: H Heng Du 提交者: GitHub

Merge pull request #2640 from areyouok/fix_resetOffset

[ISSUE #2449]  fix: resetOffset simultaneously will cause each message consume more than once
...@@ -1105,7 +1105,7 @@ public class MQClientInstance { ...@@ -1105,7 +1105,7 @@ public class MQClientInstance {
return null; return null;
} }
public void resetOffset(String topic, String group, Map<MessageQueue, Long> offsetTable) { public synchronized void resetOffset(String topic, String group, Map<MessageQueue, Long> offsetTable) {
DefaultMQPushConsumerImpl consumer = null; DefaultMQPushConsumerImpl consumer = null;
try { try {
MQConsumerInner impl = this.consumerTable.get(group); MQConsumerInner impl = this.consumerTable.get(group);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册