hailin0 commented on code in PR #6526:
URL: https://github.com/apache/seatunnel/pull/6526#discussion_r1591769303
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/binlog/MySqlBinlogFetchTask.java:
##########
@@ -72,6 +76,22 @@ public void execute(FetchTask.Context context) throws
Exception {
BinlogSplitChangeEventSourceContext changeEventSourceContext =
new BinlogSplitChangeEventSourceContext();
+ sourceFetchContext
+ .getBinaryLogClient()
+ .registerLifecycleListener(
+ new BinaryLogClient.AbstractLifecycleListener() {
+ @Override
+ public void onConnect(BinaryLogClient client) {
Review Comment:
No need to override onDisconnect method
##########
seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/binlog/MySqlBinlogFetchTask.java:
##########
@@ -72,6 +76,22 @@ public void execute(FetchTask.Context context) throws
Exception {
BinlogSplitChangeEventSourceContext changeEventSourceContext =
new BinlogSplitChangeEventSourceContext();
+ sourceFetchContext
+ .getBinaryLogClient()
+ .registerLifecycleListener(
+ new BinaryLogClient.AbstractLifecycleListener() {
+ @Override
+ public void onConnect(BinaryLogClient client) {
Review Comment:
This connection allows repeated closing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]