Package io.debezium.connector.postgresql
Class RecordsProducer
java.lang.Object
io.debezium.connector.postgresql.RecordsProducer
Class which generates Kafka Connect
SourceRecord records.- Author:
- Horia Chiorean (hchiorea@redhat.com)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.slf4j.Loggerprotected final SourceInfoprotected final PostgresTaskContext -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedRecordsProducer(PostgresTaskContext taskContext, SourceInfo sourceInfo) -
Method Summary
Modifier and TypeMethodDescriptionprotected Clockclock()protected abstract voidcommit(long lsn) Notification that offsets have been committed to Kafka up to the given LSN.protected PostgresSchemaschema()protected abstract voidstart(BlockingConsumer<ChangeEvent> recordsConsumer, Consumer<Throwable> failureConsumer) Starts up this producer.protected abstract voidstop()Requests that this producer be stopped.protected io.debezium.spi.topic.TopicNamingStrategy<TableId>
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
taskContext
-
sourceInfo
-
-
Constructor Details
-
RecordsProducer
-
-
Method Details
-
start
protected abstract void start(BlockingConsumer<ChangeEvent> recordsConsumer, Consumer<Throwable> failureConsumer) Starts up this producer. This is normally done by aPostgresConnectorTaskinstance. Subclasses should start enqueuing records via a separate thread at the end of this method.- Parameters:
recordsConsumer- a consumer ofChangeEventinstances, may not be null
-
commit
protected abstract void commit(long lsn) Notification that offsets have been committed to Kafka up to the given LSN. -
stop
protected abstract void stop()Requests that this producer be stopped. This is normally a request coming from aPostgresConnectorTaskinstance -
schema
-
topicNamingStrategy
-
clock
-