Package io.debezium.embedded.async
Class ParallelSmtConsumerProcessor
java.lang.Object
io.debezium.embedded.async.AbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>
io.debezium.embedded.async.ParallelSmtConsumerProcessor
- All Implemented Interfaces:
RecordProcessor<org.apache.kafka.connect.source.SourceRecord>
public class ParallelSmtConsumerProcessor
extends AbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>
RecordProcessor which transforms the records in parallel. Records are passed to the user-provided Consumer.
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 Summary
FieldsModifier and TypeFieldDescription(package private) final io.debezium.engine.DebeziumEngine.RecordCommitter(package private) final Consumer<org.apache.kafka.connect.source.SourceRecord>private static final org.slf4j.LoggerFields inherited from class io.debezium.embedded.async.AbstractRecordProcessor
recordService, transformations -
Constructor Summary
ConstructorsConstructorDescriptionParallelSmtConsumerProcessor(io.debezium.engine.DebeziumEngine.RecordCommitter committer, Consumer<org.apache.kafka.connect.source.SourceRecord> consumer) -
Method Summary
Modifier and TypeMethodDescriptionvoidprocessRecords(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
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
committer
final io.debezium.engine.DebeziumEngine.RecordCommitter committer -
consumer
-
-
Constructor Details
-
ParallelSmtConsumerProcessor
ParallelSmtConsumerProcessor(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: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<org.apache.kafka.connect.source.SourceRecord>- Specified by:
processRecordsin classAbstractRecordProcessor<org.apache.kafka.connect.source.SourceRecord>- Parameters:
records- List ofSourceRecordprovided by the source connector to be processed.- Throws:
Exception- Any exception is propagated to the caller.
-