Commit c16ad6fd by y1sa

新增失败回调

parent 49d964a3
......@@ -124,6 +124,10 @@ public abstract class AbstractCdcEngine<T extends AbstractCdcEngine<T>> {
if (!success) {
logger.error("启动失败, 原因: {}", message, error);
stop();
Runnable errorHandler = this.errorHandler;
if (errorHandler != null) {
errorHandler.run();
}
}
}))
.notifying(event -> {
......@@ -169,10 +173,7 @@ public abstract class AbstractCdcEngine<T extends AbstractCdcEngine<T>> {
}
this.consumerThread = null;
Runnable errorHandler = this.errorHandler;
if (errorHandler != null) {
errorHandler.run();
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment