Class ParallelSmtAsyncConsumerProcessor

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

public class ParallelSmtAsyncConsumerProcessor extends AbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>
RecordProcessor which transforms the records in parallel. Records are passed to the user-provided Consumer in arbitrary order, once they are processed. This processor should be used when user provides only custom Consumer and records should be passed without converting to the consumer in the same order as they were obtained from the database.
Author:
vjuranek
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • committer

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

      final Consumer<org.apache.kafka.connect.source.SourceRecord> consumer
  • Constructor Details

    • ParallelSmtAsyncConsumerProcessor

      ParallelSmtAsyncConsumerProcessor(io.debezium.engine.DebeziumEngine.RecordCommitter committer, Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
  • 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.