Package io.debezium.connector.postgresql
Class RecordsProducer
- java.lang.Object
-
- io.debezium.connector.postgresql.RecordsProducer
-
public abstract class RecordsProducer extends Object
Class which generates Kafka ConnectSourceRecordrecords.- Author:
- Horia Chiorean (hchiorea@redhat.com)
-
-
Field Summary
Fields Modifier and Type Field Description protected org.slf4j.Loggerloggerprotected SourceInfosourceInfoprotected PostgresTaskContexttaskContext
-
Constructor Summary
Constructors Modifier Constructor Description protectedRecordsProducer(PostgresTaskContext taskContext, SourceInfo sourceInfo)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected 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 TopicSelector<TableId>topicSelector()
-
-
-
Field Detail
-
logger
protected final org.slf4j.Logger logger
-
taskContext
protected final PostgresTaskContext taskContext
-
sourceInfo
protected final SourceInfo sourceInfo
-
-
Constructor Detail
-
RecordsProducer
protected RecordsProducer(PostgresTaskContext taskContext, SourceInfo sourceInfo)
-
-
Method Detail
-
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
protected PostgresSchema schema()
-
topicSelector
protected TopicSelector<TableId> topicSelector()
-
clock
protected Clock clock()
-
-