Class ParallelSmtBatchProcessor

java.lang.Object
io.debezium.embedded.async.AbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>
io.debezium.embedded.async.ParallelSmtBatchProcessor
All Implemented Interfaces:
RecordProcessor<org.apache.kafka.connect.source.SourceRecord>

public class ParallelSmtBatchProcessor extends AbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>
RecordProcessor which runs transformations of 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 shouldn't be converted to different format.
Author:
vjuranek
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) final io.debezium.engine.DebeziumEngine.RecordCommitter
     
    private static final org.slf4j.Logger
     
    (package private) final io.debezium.engine.DebeziumEngine.ChangeConsumer<org.apache.kafka.connect.source.SourceRecord>
     

    Fields inherited from class io.debezium.embedded.async.AbstractRecordProcessor

    recordService, transformations
  • Constructor Summary

    Constructors
    Constructor
    Description
    ParallelSmtBatchProcessor(io.debezium.engine.DebeziumEngine.RecordCommitter committer, io.debezium.engine.DebeziumEngine.ChangeConsumer<org.apache.kafka.connect.source.SourceRecord> userHandler)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    processRecords(List<org.apache.kafka.connect.source.SourceRecord> records)
    Processes a batch of records provided by the source connector.

    Methods inherited from class io.debezium.embedded.async.AbstractRecordProcessor

    initialize

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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<org.apache.kafka.connect.source.SourceRecord> userHandler
  • Constructor Details

    • ParallelSmtBatchProcessor

      ParallelSmtBatchProcessor(io.debezium.engine.DebeziumEngine.RecordCommitter committer, io.debezium.engine.DebeziumEngine.ChangeConsumer<org.apache.kafka.connect.source.SourceRecord> userHandler)
  • 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<org.apache.kafka.connect.source.SourceRecord>
      Specified by:
      processRecords in class AbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>
      Parameters:
      records - List of SourceRecord provided by the source connector to be processed.
      Throws:
      Exception - Any exception is propagated to the caller.