Package io.debezium.embedded.async
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
Abstract implementation of
RecordProcessor, which provides implementation of processor initialization, while the record processing implementation
left to the children classes.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinitialize(ExecutorService recordService, Transformations transformations) Initialize the processor with objects created and managed byDebeziumEngine, which are needed for records processing.abstract voidprocessRecords(List<org.apache.kafka.connect.source.SourceRecord> records) Processes a batch of records provided by the source connector.
-
Field Details
-
recordService
-
transformations
-
-
Constructor Details
-
AbstractRecordProcessor
public AbstractRecordProcessor()
-
-
Method Details
-
initialize
Description copied from interface:RecordProcessorInitialize the processor with objects created and managed byDebeziumEngine, which are needed for records processing.- Specified by:
initializein interfaceRecordProcessor<R>- Parameters:
recordService-ExecutorServicewhich 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:RecordProcessorProcesses a batch of records provided by the source connector. Implementations are assumed to useDebeziumEngine.RecordCommitterto appropriately commit individual records and the batch itself.- Specified by:
processRecordsin interfaceRecordProcessor<R>- Parameters:
records- List ofSourceRecordprovided by the source connector to be processed.- Throws:
Exception- Any exception is propagated to the caller.
-