Class PostgresConnector

  • All Implemented Interfaces:
    org.apache.kafka.connect.components.Versioned

    public class PostgresConnector
    extends RelationalBaseSourceConnector
    A Kafka Connect source connector that creates tasks which use Postgresql streaming replication off a logical replication slot to receive incoming changes for a database and publish them to Kafka.

    Configuration

    This connector is configured with the set of properties described in PostgresConnectorConfig.

    Author:
    Horia Chiorean
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
    • Constructor Detail

      • PostgresConnector

        public PostgresConnector()
    • Method Detail

      • version

        public String version()
      • taskClass

        public Class<? extends org.apache.kafka.connect.connector.Task> taskClass()
        Specified by:
        taskClass in class org.apache.kafka.connect.connector.Connector
      • start

        public void start​(Map<String,​String> props)
        Specified by:
        start in class org.apache.kafka.connect.connector.Connector
      • taskConfigs

        public List<Map<String,​String>> taskConfigs​(int maxTasks)
        Specified by:
        taskConfigs in class org.apache.kafka.connect.connector.Connector
      • stop

        public void stop()
        Specified by:
        stop in class org.apache.kafka.connect.connector.Connector
      • config

        public org.apache.kafka.common.config.ConfigDef config()
        Specified by:
        config in class org.apache.kafka.connect.connector.Connector