Merge pull request #2640 from areyouok/fix_resetOffset

[ISSUE #2449]  fix: resetOffset simultaneously will cause each message consume more than once
This commit is contained in:
Heng Du
2021-01-28 00:48:48 +08:00
committed by GitHub
@@ -1105,7 +1105,7 @@ public class MQClientInstance {
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;
try {
MQConsumerInner impl = this.consumerTable.get(group);