private void shutdownEngine() {
        try {
            if (engine != null) {
                engine.close();
            }
        } catch (IOException e) {
            ExceptionUtils.rethrow(e);
        } finally {
            if (executor != null) {
                executor.shutdownNow();
            }

            debeziumStarted = false;

            if (handover != null) {
                handover.close();
            }
        }
    }
Safely and gracefully stop the Debezium engine.
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/sqlserver-cdc/src/main/java/org/apache/inlong/sort/sqlserver/DebeziumSourceFunction.java