@Override
                            public void deserialize(SourceRecord record, Collector<T> out,
                                    TableChange tableSchema) throws Exception {
                                deserializer.deserialize(record, new CallbackCollector<>(inputRow -> {
                                    if (sourceMetricData != null && record != null && migrateAll) {
                                        Struct value = (Struct) record.value();
                                        Struct source = value.getStruct(Envelope.FieldName.SOURCE);
                                        String dbName = source.getString(AbstractSourceInfo.DATABASE_NAME_KEY);
                                        String tableName = source.getString(AbstractSourceInfo.TABLE_NAME_KEY);
                                        SnapshotRecord snapshotRecord = SnapshotRecord.fromSource(source);
                                        boolean isSnapshotRecord = (SnapshotRecord.TRUE == snapshotRecord);
                                        sourceMetricData
                                                .outputMetricsWithEstimate(dbName, tableName, isSnapshotRecord, value);
                                    } else if (sourceMetricData != null && record != null) {
                                        sourceMetricData.outputMetricsWithEstimate(record.value());
                                    }
                                    out.collect(inputRow);
                                }), tableSchema);
                            }
Buffer the events from the source and record the errors from the debezium.
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/mysql-cdc/src/main/java/org/apache/inlong/sort/cdc/debezium/DebeziumSourceFunction.java