独行的浪子
2022-04-26 3ad94b9abcbde117c6d6ce43a9d023b7755ec0eb
Update DmlMessageTransponderContainer.java
1个文件已修改
16 ■■■■■ 已修改文件
src/main/java/com/duxinglangzi/canal/starter/container/DmlMessageTransponderContainer.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/duxinglangzi/canal/starter/container/DmlMessageTransponderContainer.java
@@ -64,13 +64,15 @@
            sleep(endpointInstance.getAcquireInterval());
            return;
        }
        try {
            entries.forEach(e -> consumer(e));
        } catch (Exception e) {
            e.printStackTrace();
            logger.error("[MessageTransponderContainer_doStart] CanalEntry.Entry consumer error ", e);
            // connector.rollback(message.getId()); // 目前先不处理失败, 无需回滚数据
            // return;
        for (CanalEntry.Entry entry : entries) {
            try {
                consumer(entry);
            } catch (Exception e) {
                e.printStackTrace();
                logger.error("[MessageTransponderContainer_doStart] CanalEntry.Entry consumer error ", e);
                // connector.rollback(message.getId()); // 目前先不处理失败, 无需回滚数据
                // return;
            }
        }
        connector.ack(message.getId()); // 提交确认
    }