Class AbstractRecordProcessor<R>

java.lang.Object
io.debezium.embedded.async.AbstractRecordProcessor<R>
All Implemented Interfaces:
RecordProcessor<R>
Direct Known Subclasses:
ParallelSmtAndConvertAsyncConsumerProcessor, ParallelSmtAndConvertBatchProcessor, ParallelSmtAndConvertConsumerProcessor, ParallelSmtAsyncConsumerProcessor, ParallelSmtBatchProcessor, ParallelSmtConsumerProcessor

public abstract class AbstractRecordProcessor<R> extends Object implements RecordProcessor<R>
Abstract implementation of RecordProcessor, which provides implementation of processor initialization, while the record processing implementation left to the children classes.
  • Field Details

  • Constructor Details

    • AbstractRecordProcessor

      public AbstractRecordProcessor()
  • Method Details

    • initialize

      public void initialize(ExecutorService recordService, Transformations transformations)
      Description copied from interface: RecordProcessor
      Initialize the processor with objects created and managed by DebeziumEngine, which are needed for records processing.
      Specified by:
      initialize in interface RecordProcessor<R>
      Parameters:
      recordService - ExecutorService which allows to run processing of individual records in parallel.
      transformations - chain of transformations to be applied on every individual record.
    • processRecords

      public abstract 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>
      Parameters:
      records - List of SourceRecord provided by the source connector to be processed.
      Throws:
      Exception - Any exception is propagated to the caller.