Class ParallelSmtAndConvertBatchProcessor<R>

java.lang.Object
io.debezium.embedded.async.AbstractRecordProcessor<R>
io.debezium.embedded.async.ParallelSmtAndConvertBatchProcessor<R>
All Implemented Interfaces:
RecordProcessor<R>

public class ParallelSmtAndConvertBatchProcessor<R> extends AbstractRecordProcessor<R>
RecordProcessor which transforms and converts the records in parallel and then pass the whole batch to the user-provided handler. This processor should be used when user provides its own DebeziumEngine.ChangeConsumer and records should be converted to different format.
Author:
vjuranek
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • committer

      final io.debezium.engine.DebeziumEngine.RecordCommitter committer
    • userHandler

      final io.debezium.engine.DebeziumEngine.ChangeConsumer<R> userHandler
    • convertor

      final Function<org.apache.kafka.connect.source.SourceRecord,R> convertor
  • Constructor Details

    • ParallelSmtAndConvertBatchProcessor

      ParallelSmtAndConvertBatchProcessor(io.debezium.engine.DebeziumEngine.RecordCommitter committer, io.debezium.engine.DebeziumEngine.ChangeConsumer<R> userHandler, Function<org.apache.kafka.connect.source.SourceRecord,R> convertor)
  • Method Details

    • processRecords

      public void processRecords(List<org.apache.kafka.connect.source.SourceRecord> records) throws Exception
      Description copied from interface: RecordProcessor
      Processes a batch of records provided by the source connector. Implementations are assumed to use DebeziumEngine.RecordCommitter to appropriately commit individual records and the batch itself.
      Specified by:
      processRecords in interface RecordProcessor<R>
      Specified by:
      processRecords in class AbstractRecordProcessor<R>
      Parameters:
      records - List of SourceRecord provided by the source connector to be processed.
      Throws:
      Exception - Any exception is propagated to the caller.