Package io.debezium.connector.postgresql
Class PostgresConnectorTask
java.lang.Object
org.apache.kafka.connect.source.SourceTask
io.debezium.connector.common.BaseSourceTask<PostgresPartition,PostgresOffsetContext>
io.debezium.connector.postgresql.PostgresConnectorTask
- All Implemented Interfaces:
org.apache.kafka.connect.connector.Task
Kafka connect source task which uses Postgres logical decoding over a streaming replication connection to process DB changes.
- Author:
- Horia Chiorean (hchiorea@redhat.com)
-
Nested Class Summary
Nested classes/interfaces inherited from class io.debezium.connector.common.BaseSourceTask
BaseSourceTask.StateNested classes/interfaces inherited from class org.apache.kafka.connect.source.SourceTask
org.apache.kafka.connect.source.SourceTask.TransactionBoundary -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate ErrorHandlerprivate PostgresConnectionprivate static final org.slf4j.Loggerprivate ChangeEventQueue<DataChangeEvent>private ReplicationConnectionprivate PostgresSchemaprivate PostgresTaskContextFields inherited from class io.debezium.connector.common.BaseSourceTask
coordinatorFields inherited from class org.apache.kafka.connect.source.SourceTask
context, TRANSACTION_BOUNDARY_CONFIG -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateReplicationConnection(PostgresTaskContext taskContext, int maxRetries, Duration retryDelay) List<org.apache.kafka.connect.source.SourceRecord>doPoll()protected voiddoStop()start(Configuration config) version()Methods inherited from class io.debezium.connector.common.BaseSourceTask
commit, commitRecord, getAvailableSignalChannels, getNotificationChannels, getPreviousOffsets, getTaskState, logStatistics, poll, start, stop, withMaskedSensitiveOptionsMethods inherited from class org.apache.kafka.connect.source.SourceTask
commitRecord, initialize
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CONTEXT_NAME
- See Also:
-
taskContext
-
queue
-
jdbcConnection
-
replicationConnection
-
errorHandler
-
schema
-
-
Constructor Details
-
PostgresConnectorTask
public PostgresConnectorTask()
-
-
Method Details
-
start
public ChangeEventSourceCoordinator<PostgresPartition,PostgresOffsetContext> start(Configuration config) - Specified by:
startin classBaseSourceTask<PostgresPartition,PostgresOffsetContext>
-
createReplicationConnection
public ReplicationConnection createReplicationConnection(PostgresTaskContext taskContext, int maxRetries, Duration retryDelay) throws org.apache.kafka.connect.errors.ConnectException - Throws:
org.apache.kafka.connect.errors.ConnectException
-
doPoll
- Specified by:
doPollin classBaseSourceTask<PostgresPartition,PostgresOffsetContext> - Throws:
InterruptedException
-
doStop
protected void doStop()- Specified by:
doStopin classBaseSourceTask<PostgresPartition,PostgresOffsetContext>
-
version
-
getAllConfigurationFields
- Specified by:
getAllConfigurationFieldsin classBaseSourceTask<PostgresPartition,PostgresOffsetContext>
-
getTaskContext
-