private void restoreOffsetState() throws Exception {
        for (byte[] serializedOffset : offsetState.get()) {
            if (restoredOffsetState == null) {
                restoredOffsetState = new String(serializedOffset, StandardCharsets.UTF_8);
            } else {
                throw new RuntimeException(
                        "Debezium Source only support single task, "
                                + "however, this is restored from multiple tasks.");
            }
        }
        LOG.info(
                "Consumer subtask {} restored offset state: {}.",
                getRuntimeContext().getIndexOfThisSubtask(),
                restoredOffsetState);
    }
Buffer the events from the source and record the errors from the debezium.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/oracle-cdc/src/main/java/org/apache/inlong/sort/cdc/oracle/debezium/DebeziumSourceFunction.java