修复kafka消费回滚的bug (#2521)

This commit is contained in:
rewerma
2020-01-02 16:15:47 +08:00
committed by GitHub
parent 6d9ea57186
commit 31acfc0101
2 changed files with 20 additions and 15 deletions

View File

@@ -174,6 +174,11 @@ public abstract class AbstractCanalAdapterWorker {
if (i == retry - 1) {
connector.ack();
logger.error(e.getMessage() + " Error sync but ACK!");
try {
Thread.sleep(500);
} catch (InterruptedException e1) {
// ignore
}
return true;
} else {
connector.rollback();