Class CommonConnectorConfig

  • Direct Known Subclasses:
    RelationalDatabaseConnectorConfig

    public abstract class CommonConnectorConfig
    extends Object
    Configuration options common to all Debezium connectors.
    Author:
    Gunnar Morling
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • DEFAULT_QUERY_FETCH_SIZE

        public static final int DEFAULT_QUERY_FETCH_SIZE
        See Also:
        Constant Field Values
      • DEFAULT_POLL_INTERVAL_MILLIS

        public static final long DEFAULT_POLL_INTERVAL_MILLIS
        See Also:
        Constant Field Values
      • DEFAULT_RETRIABLE_RESTART_WAIT

        public static final long DEFAULT_RETRIABLE_RESTART_WAIT
        See Also:
        Constant Field Values
      • DEFAULT_MAX_QUEUE_SIZE_IN_BYTES

        public static final long DEFAULT_MAX_QUEUE_SIZE_IN_BYTES
        See Also:
        Constant Field Values
      • RETRIABLE_RESTART_WAIT

        public static final Field RETRIABLE_RESTART_WAIT
      • TOMBSTONES_ON_DELETE

        public static final Field TOMBSTONES_ON_DELETE
      • MAX_QUEUE_SIZE

        public static final Field MAX_QUEUE_SIZE
      • MAX_BATCH_SIZE

        public static final Field MAX_BATCH_SIZE
      • POLL_INTERVAL_MS

        public static final Field POLL_INTERVAL_MS
      • MAX_QUEUE_SIZE_IN_BYTES

        public static final Field MAX_QUEUE_SIZE_IN_BYTES
      • SNAPSHOT_DELAY_MS

        public static final Field SNAPSHOT_DELAY_MS
      • SNAPSHOT_FETCH_SIZE

        public static final Field SNAPSHOT_FETCH_SIZE
      • INCREMENTAL_SNAPSHOT_CHUNK_SIZE

        public static final Field INCREMENTAL_SNAPSHOT_CHUNK_SIZE
      • INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES

        public static final Field INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES
      • SNAPSHOT_MODE_TABLES

        public static final Field SNAPSHOT_MODE_TABLES
      • SOURCE_STRUCT_MAKER_VERSION

        public static final Field SOURCE_STRUCT_MAKER_VERSION
      • SANITIZE_FIELD_NAMES

        public static final Field SANITIZE_FIELD_NAMES
      • PROVIDE_TRANSACTION_METADATA

        public static final Field PROVIDE_TRANSACTION_METADATA
      • EVENT_PROCESSING_FAILURE_HANDLING_MODE

        public static final Field EVENT_PROCESSING_FAILURE_HANDLING_MODE
      • CUSTOM_CONVERTERS

        public static final Field CUSTOM_CONVERTERS
      • SKIPPED_OPERATIONS

        public static final Field SKIPPED_OPERATIONS
      • BINARY_HANDLING_MODE

        public static final Field BINARY_HANDLING_MODE
      • QUERY_FETCH_SIZE

        public static final Field QUERY_FETCH_SIZE
      • SNAPSHOT_MAX_THREADS

        public static final Field SNAPSHOT_MAX_THREADS
      • SIGNAL_DATA_COLLECTION

        public static final Field SIGNAL_DATA_COLLECTION
      • TRANSACTION_TOPIC

        public static final Field TRANSACTION_TOPIC
      • CUSTOM_RETRIABLE_EXCEPTION

        public static final Field CUSTOM_RETRIABLE_EXCEPTION
      • emitTombstoneOnDelete

        private final boolean emitTombstoneOnDelete
      • maxQueueSize

        private final int maxQueueSize
      • maxBatchSize

        private final int maxBatchSize
      • maxQueueSizeInBytes

        private final long maxQueueSizeInBytes
      • pollInterval

        private final Duration pollInterval
      • logicalName

        private final String logicalName
      • heartbeatTopicsPrefix

        private final String heartbeatTopicsPrefix
      • heartbeatInterval

        private final Duration heartbeatInterval
      • snapshotDelay

        private final Duration snapshotDelay
      • retriableRestartWait

        private final Duration retriableRestartWait
      • snapshotFetchSize

        private final int snapshotFetchSize
      • incrementalSnapshotChunkSize

        private final int incrementalSnapshotChunkSize
      • incrementalSnapshotAllowSchemaChanges

        private final boolean incrementalSnapshotAllowSchemaChanges
      • snapshotMaxThreads

        private final int snapshotMaxThreads
      • queryFetchSize

        private final Integer queryFetchSize
      • sanitizeFieldNames

        private final boolean sanitizeFieldNames
      • shouldProvideTransactionMetadata

        private final boolean shouldProvideTransactionMetadata
      • signalingDataCollection

        private final String signalingDataCollection
      • transactionTopic

        private final String transactionTopic
      • taskId

        private final String taskId
    • Constructor Detail

      • CommonConnectorConfig

        protected CommonConnectorConfig​(Configuration config,
                                        String logicalName,
                                        int defaultSnapshotFetchSize)
    • Method Detail

      • getConfig

        @Deprecated
        public Configuration getConfig()
        Deprecated.
        Provides access to the "raw" config instance. In most cases, access via typed getters for individual properties on the connector config class should be preferred. TODO this should be protected in the future to force proper facade methods based access / encapsulation
      • isEmitTombstoneOnDelete

        public boolean isEmitTombstoneOnDelete()
      • getMaxQueueSize

        public int getMaxQueueSize()
      • getMaxBatchSize

        public int getMaxBatchSize()
      • getMaxQueueSizeInBytes

        public long getMaxQueueSizeInBytes()
      • getPollInterval

        public Duration getPollInterval()
      • getLogicalName

        public String getLogicalName()
      • getContextName

        public abstract String getContextName()
      • getConnectorName

        public abstract String getConnectorName()
      • getHeartbeatTopicsPrefix

        public String getHeartbeatTopicsPrefix()
      • getHeartbeatInterval

        public Duration getHeartbeatInterval()
      • getRetriableRestartWait

        public Duration getRetriableRestartWait()
      • getSnapshotDelay

        public Duration getSnapshotDelay()
      • getSnapshotFetchSize

        public int getSnapshotFetchSize()
      • getSnapshotMaxThreads

        public int getSnapshotMaxThreads()
      • getQueryFetchSize

        public int getQueryFetchSize()
      • getIncrementalSnashotChunkSize

        public int getIncrementalSnashotChunkSize()
      • shouldProvideTransactionMetadata

        public boolean shouldProvideTransactionMetadata()
      • getTransactionTopic

        public String getTransactionTopic()
        Returns the name to be used for the connector's TX metadata topic.
      • supportsOperationFiltering

        public boolean supportsOperationFiltering()
        Whether a particular connector supports an optimized way for implementing operation skipping, or not.
      • supportsSchemaChangesDuringIncrementalSnapshot

        protected boolean supportsSchemaChangesDuringIncrementalSnapshot()
      • isIncrementalSnapshotSchemaChangesEnabled

        public boolean isIncrementalSnapshotSchemaChangesEnabled()
      • getSanitizeFieldNames

        public boolean getSanitizeFieldNames()
      • legacyGetDataCollectionsToBeSnapshotted

        @Deprecated
        public Set<String> legacyGetDataCollectionsToBeSnapshotted()
        Deprecated.
      • getDataCollectionsToBeSnapshotted

        public Set<Pattern> getDataCollectionsToBeSnapshotted()
      • isSchemaChangesHistoryEnabled

        public boolean isSchemaChangesHistoryEnabled()
        Returns:
        true if the connector should emit messages about schema changes into a public facing topic.
      • isSchemaCommentsHistoryEnabled

        public boolean isSchemaCommentsHistoryEnabled()
        Returns:
        true if the connector should emit messages which include table and column comments.
      • validate

        public boolean validate​(Iterable<Field> fields,
                                Field.ValidationOutput problems)
        Validates the supplied fields in this configuration. Extra fields not described by the supplied fields parameter will not be validated.
        Parameters:
        fields - the fields
        problems - the consumer to eb called with each problem; never null
        Returns:
        true if the value is considered valid, or false if it is not valid
      • validateAndRecord

        public boolean validateAndRecord​(Iterable<Field> fields,
                                         Consumer<String> problems)
        Validate the supplied fields in this configuration. Extra fields not described by the supplied fields parameter will not be validated.
        Parameters:
        fields - the fields
        problems - the consumer to be called with each problem; never null
        Returns:
        true if the value is considered valid, or false if it is not valid
      • isUsingAvroConverter

        private static boolean isUsingAvroConverter​(Configuration config)
      • getSignalingDataCollectionId

        public String getSignalingDataCollectionId()
      • parseSignallingMessage

        public Optional<String[]> parseSignallingMessage​(org.apache.kafka.connect.data.Struct value)
      • isSignalDataCollection

        public boolean isSignalDataCollection​(DataCollectionId dataCollectionId)
      • customRetriableException

        public Optional<String> customRetriableException()
      • getTaskId

        public String getTaskId()