Interface RecordProcessor<R>

All Known Implementing Classes:
AbstractRecordProcessor, ParallelSmtAndConvertAsyncConsumerProcessor, ParallelSmtAndConvertBatchProcessor, ParallelSmtAndConvertConsumerProcessor, ParallelSmtAsyncConsumerProcessor, ParallelSmtBatchProcessor, ParallelSmtConsumerProcessor

@Incubating public interface RecordProcessor<R>
Generalization of DebeziumEngine.ChangeConsumer, giving the user complete control over the whole records processing chain. Processor is initialized with all the required engine internals, like chain of transformations, to be able to implement whole record processing chain. Implementations can provide serial or parallel processing of the change records or anything in between, eventually also add any other kind of manipulation with the records. Any exception thrown during the processing of the records it propagated to the caller.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(ExecutorService recordService, Transformations transformations)
    Initialize the processor with objects created and managed by DebeziumEngine, which are needed for records processing.
    void
    processRecords(List<org.apache.kafka.connect.source.SourceRecord> records)
    Processes a batch of records provided by the source connector.
  • Method Details

    • initialize

      void initialize(ExecutorService recordService, Transformations transformations)
      Initialize the processor with objects created and managed by DebeziumEngine, which are needed for records processing.
      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

      void processRecords(List<org.apache.kafka.connect.source.SourceRecord> records) throws Exception
      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.
      Parameters:
      records - List of SourceRecord provided by the source connector to be processed.
      Throws:
      Exception - Any exception is propagated to the caller.