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

This reverts commit b6333f018f.
This commit is contained in:
rewerma
2020-01-04 15:18:38 +08:00
committed by GitHub
parent b6333f018f
commit f742bd73cb
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();