Package io.debezium.config
Class CommonConnectorConfig
java.lang.Object
io.debezium.config.CommonConnectorConfig
- Direct Known Subclasses:
RelationalDatabaseConnectorConfig
Configuration options common to all Debezium connectors.
- Author:
- Gunnar Morling
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe set of predefined BinaryHandlingMode options or aliasesstatic enumstatic enumThe set of predefined modes for dealing with failures during event processing.static enumThe set of predefined FieldNameAdjustmentMode optionsstatic enumThe set of predefined SchemaNameAdjustmentMode optionsstatic enumstatic enumThe set of predefined versions e.g.static enumThe set of predefined incremental snapshot watermarking strategies -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprotected final DefaultBeanRegistrystatic final Fieldprivate final CommonConnectorConfig.BinaryHandlingModeprivate final Configurationprotected static final ConfigDefinitionprivate static final Stringprivate static final Stringstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprivate final CustomConverterRegistrystatic final Stringstatic final intstatic final intstatic final longstatic final intstatic final longstatic final intstatic final longstatic final Stringprivate final booleanstatic final Stringstatic final Fieldstatic final Fieldprivate final CommonConnectorConfig.EventConvertingFailureHandlingModeprivate final CommonConnectorConfig.EventProcessingFailureHandlingModestatic final longstatic final Fieldprivate final CommonConnectorConfig.FieldNameAdjustmentModeprivate final Durationprivate final Stringstatic final Fieldstatic final Fieldstatic final Fieldprivate final booleanprivate final intprivate static final org.slf4j.Loggerprotected final Stringstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprivate final intprivate final intprivate final longprivate final intstatic final Stringstatic final Stringstatic final Fieldprivate final Stringstatic final Fieldprivate final Durationstatic final Fieldstatic final Fieldprivate final Integerstatic final Fieldprivate final Durationstatic final Fieldprivate final CommonConnectorConfig.SchemaNameAdjustmentModeprotected final DefaultServiceRegistryprivate final booleanstatic final Fieldstatic final Fieldstatic final Fieldprivate final Stringprivate final TableIdprivate final Durationstatic final FieldSpecifies whether to skip messages containing no updates in included columnsprivate final booleanstatic final Fieldprivate final EnumSet<Envelope.Operation>static final Fieldstatic final Fieldstatic final Fieldstatic final Stringstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Stringstatic final Fieldstatic final Fieldstatic final Fieldprivate final Durationprivate final intprotected Stringprivate final intprotected final booleanprotected final booleanprotected final booleanprotected final booleanprotected final booleanprivate final Stringprotected CommonConnectorConfig.SnapshotQueryModeprotected Stringstatic final Fieldprivate final SourceInfoStructMaker<? extends AbstractSourceInfo>static final Stringprivate final Stringstatic final Fieldstatic final Patternstatic final Fieldstatic final Field -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCommonConnectorConfig(Configuration config, int defaultSnapshotFetchSize) -
Method Summary
Modifier and TypeMethodDescriptioncreateCustomMetricTags(Configuration config) createHeartbeat(TopicNamingStrategy topicNamingStrategy, SchemaNameAdjuster schemaNameAdjuster, HeartbeatConnectionProvider connectionProvider, HeartbeatErrorHandler errorHandler) private static EnumSet<Envelope.Operation>Deprecated.abstract Stringabstract Stringprivate List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,ConvertedField>> intintintlongintintintabstract Optional<? extends EnumeratedValue>intabstract EnumeratedValue<T extends AbstractSourceInfo>
SourceInfoStructMaker<T>protected abstract SourceInfoStructMaker<?>Returns the connector-specificSourceInfoStructMakerbased on the given configuration.<T extends AbstractSourceInfo>
SourceInfoStructMaker<T>getSourceInfoStructMaker(Field sourceInfoStructMakerField, String connector, String version, CommonConnectorConfig connectorConfig) getTopicNamingStrategy(Field topicNamingStrategyField) getTopicNamingStrategy(Field topicNamingStrategyField, boolean multiPartitionMode) booleanbooleanbooleanbooleanbooleanisSignalDataCollection(DataCollectionId dataCollectionId) private static booleanisUsingAvroConverter(Configuration config) parseSignallingMessage(org.apache.kafka.connect.data.Struct value) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanWhether a particular connector supports an optimized way for implementing operation skipping, or not.protected booleanbooleanvalidate(Iterable<Field> fields, Field.ValidationOutput problems) Validates the supplied fields in this configuration.booleanvalidateAndRecord(Iterable<Field> fields, Consumer<String> problems) Validate the supplied fields in this configuration.private static intvalidateMaxQueueSize(Configuration config, Field field, Field.ValidationOutput problems) protected static intvalidateSkippedOperation(Configuration config, Field field, Field.ValidationOutput problems) static intvalidateTopicName(Configuration config, Field field, Field.ValidationOutput problems)
-
Field Details
-
TASK_ID
- See Also:
-
TOPIC_NAME_PATTERN
-
MULTI_PARTITION_MODE
- See Also:
-
SNAPSHOT_MODE_PROPERTY_NAME
- See Also:
-
SNAPSHOT_LOCKING_MODE_PROPERTY_NAME
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
snapshotQueryMode
-
snapshotQueryModeCustomName
-
snapshotLockingModeCustomName
-
snapshotModeConfigurationBasedSnapshotData
protected final boolean snapshotModeConfigurationBasedSnapshotData -
snapshotModeConfigurationBasedSnapshotSchema
protected final boolean snapshotModeConfigurationBasedSnapshotSchema -
snapshotModeConfigurationBasedStream
protected final boolean snapshotModeConfigurationBasedStream -
snapshotModeConfigurationBasedSnapshotOnSchemaError
protected final boolean snapshotModeConfigurationBasedSnapshotOnSchemaError -
snapshotModeConfigurationBasedSnapshotOnDataError
protected final boolean snapshotModeConfigurationBasedSnapshotOnDataError -
CONFLUENT_AVRO_CONVERTER
- See Also:
-
APICURIO_AVRO_CONVERTER
- See Also:
-
EXECUTOR_SHUTDOWN_TIMEOUT_SEC
public static final long EXECUTOR_SHUTDOWN_TIMEOUT_SEC- See Also:
-
DEFAULT_MAX_QUEUE_SIZE
public static final int DEFAULT_MAX_QUEUE_SIZE- See Also:
-
DEFAULT_MAX_BATCH_SIZE
public static final int DEFAULT_MAX_BATCH_SIZE- See Also:
-
DEFAULT_QUERY_FETCH_SIZE
public static final int DEFAULT_QUERY_FETCH_SIZE- See Also:
-
DEFAULT_POLL_INTERVAL_MILLIS
public static final long DEFAULT_POLL_INTERVAL_MILLIS- See Also:
-
DATABASE_CONFIG_PREFIX
- See Also:
-
DRIVER_CONFIG_PREFIX
- See Also:
-
CONVERTER_TYPE_SUFFIX
- See Also:
-
DEFAULT_RETRIABLE_RESTART_WAIT
public static final long DEFAULT_RETRIABLE_RESTART_WAIT- See Also:
-
DEFAULT_MAX_QUEUE_SIZE_IN_BYTES
public static final long DEFAULT_MAX_QUEUE_SIZE_IN_BYTES- See Also:
-
NOTIFICATION_CONFIGURATION_FIELD_PREFIX_STRING
- See Also:
-
DEFAULT_MAX_RETRIES
public static final int DEFAULT_MAX_RETRIES- See Also:
-
ERRORS_MAX_RETRIES
- See Also:
-
maxRetriesOnError
private final int maxRetriesOnError -
TOPIC_PREFIX
-
RETRIABLE_RESTART_WAIT
-
TOMBSTONES_ON_DELETE
-
MAX_QUEUE_SIZE
-
MAX_BATCH_SIZE
-
POLL_INTERVAL_MS
-
MAX_QUEUE_SIZE_IN_BYTES
-
SNAPSHOT_DELAY_MS
-
SNAPSHOT_FETCH_SIZE
-
INCREMENTAL_SNAPSHOT_CHUNK_SIZE
-
INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES
-
SNAPSHOT_MODE_TABLES
-
PROVIDE_TRANSACTION_METADATA
-
EVENT_PROCESSING_FAILURE_HANDLING_MODE
-
CUSTOM_CONVERTERS
-
CUSTOM_POST_PROCESSORS
-
SKIPPED_OPERATIONS
-
SKIP_MESSAGES_WITHOUT_CHANGE
Specifies whether to skip messages containing no updates in included columns -
BINARY_HANDLING_MODE
-
SCHEMA_NAME_ADJUSTMENT_MODE
-
FIELD_NAME_ADJUSTMENT_MODE
-
QUERY_FETCH_SIZE
-
SNAPSHOT_MAX_THREADS
-
SIGNAL_DATA_COLLECTION
-
SIGNAL_POLL_INTERVAL_MS
-
SIGNAL_ENABLED_CHANNELS
-
TOPIC_NAMING_STRATEGY
-
CUSTOM_RETRIABLE_EXCEPTION
-
NOTIFICATION_ENABLED_CHANNELS
-
SOURCE_INFO_STRUCT_MAKER
-
MAX_RETRIES_ON_ERROR
-
CUSTOM_METRIC_TAGS
-
INCREMENTAL_SNAPSHOT_WATERMARKING_STRATEGY
-
SNAPSHOT_MODE_CUSTOM_NAME
-
EVENT_CONVERTING_FAILURE_HANDLING_MODE
-
SNAPSHOT_LOCKING_MODE_CUSTOM_NAME
-
SNAPSHOT_QUERY_MODE
-
SNAPSHOT_QUERY_MODE_CUSTOM_NAME
-
SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_DATA
-
SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_SCHEMA
-
SNAPSHOT_MODE_CONFIGURATION_BASED_START_STREAM
-
SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_ON_SCHEMA_ERROR
-
SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_ON_DATA_ERROR
-
CONFIG_DEFINITION
-
config
-
emitTombstoneOnDelete
private final boolean emitTombstoneOnDelete -
maxQueueSize
private final int maxQueueSize -
maxBatchSize
private final int maxBatchSize -
maxQueueSizeInBytes
private final long maxQueueSizeInBytes -
pollInterval
-
logicalName
-
heartbeatTopicsPrefix
-
heartbeatInterval
-
snapshotDelay
-
retriableRestartWait
-
snapshotFetchSize
private final int snapshotFetchSize -
incrementalSnapshotChunkSize
private final int incrementalSnapshotChunkSize -
incrementalSnapshotAllowSchemaChanges
private final boolean incrementalSnapshotAllowSchemaChanges -
snapshotMaxThreads
private final int snapshotMaxThreads -
snapshotModeCustomName
-
queryFetchSize
-
sourceInfoStructMaker
-
shouldProvideTransactionMetadata
private final boolean shouldProvideTransactionMetadata -
eventProcessingFailureHandlingMode
private final CommonConnectorConfig.EventProcessingFailureHandlingMode eventProcessingFailureHandlingMode -
customConverterRegistry
-
binaryHandlingMode
-
schemaNameAdjustmentMode
-
fieldNameAdjustmentMode
-
eventConvertingFailureHandlingMode
private final CommonConnectorConfig.EventConvertingFailureHandlingMode eventConvertingFailureHandlingMode -
signalingDataCollection
-
signalingDataCollectionId
-
signalPollInterval
-
signalEnabledChannels
-
skippedOperations
-
taskId
-
skipMessagesWithoutChange
private final boolean skipMessagesWithoutChange -
notificationTopicName
-
enabledNotificationChannels
-
customMetricTags
-
incrementalSnapshotWatermarkingStrategy
-
beanRegistry
-
serviceRegistry
-
-
Constructor Details
-
CommonConnectorConfig
-
-
Method Details
-
getSignalEnabledChannels
-
determineSkippedOperations
-
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 -
getBeanRegistry
-
getServiceRegistry
-
isEmitTombstoneOnDelete
public boolean isEmitTombstoneOnDelete() -
getMaxQueueSize
public int getMaxQueueSize() -
getMaxBatchSize
public int getMaxBatchSize() -
getMaxQueueSizeInBytes
public long getMaxQueueSizeInBytes() -
getPollInterval
-
getLogicalName
-
getContextName
-
getConnectorName
-
getSnapshotMode
-
getSnapshotLockingMode
-
getHeartbeatTopicsPrefix
-
getHeartbeatInterval
-
getSnapshotDelay
-
getSnapshotFetchSize
public int getSnapshotFetchSize() -
getSnapshotMaxThreads
public int getSnapshotMaxThreads() -
getSnapshotModeCustomName
-
getQueryFetchSize
public int getQueryFetchSize() -
getIncrementalSnapshotChunkSize
public int getIncrementalSnapshotChunkSize() -
getNotificationTopic
-
getEnabledNotificationChannels
-
shouldProvideTransactionMetadata
public boolean shouldProvideTransactionMetadata() -
skipMessagesWithoutChange
public boolean skipMessagesWithoutChange() -
getEventProcessingFailureHandlingMode
public CommonConnectorConfig.EventProcessingFailureHandlingMode getEventProcessingFailureHandlingMode() -
customConverterRegistry
-
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() -
getTopicNamingStrategy
-
getTopicNamingStrategy
public TopicNamingStrategy getTopicNamingStrategy(Field topicNamingStrategyField, boolean multiPartitionMode) -
getCustomConverters
private List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,ConvertedField>> getCustomConverters() -
getSourceInfoStructMaker
-
getSkippedOperations
-
getDataCollectionsToBeSnapshotted
-
getCustomMetricTags
-
createCustomMetricTags
-
getIncrementalSnapshotWatermarkingStrategy
-
getEventConvertingFailureHandlingMode
public CommonConnectorConfig.EventConvertingFailureHandlingMode getEventConvertingFailureHandlingMode() -
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
Validates the supplied fields in this configuration. Extra fields not described by the suppliedfieldsparameter will not be validated.- Parameters:
fields- the fieldsproblems- the consumer to eb called with each problem; never null- Returns:
trueif the value is considered valid, orfalseif it is not valid
-
validateAndRecord
Validate the supplied fields in this configuration. Extra fields not described by the suppliedfieldsparameter will not be validated.- Parameters:
fields- the fieldsproblems- the consumer to be called with each problem; never null- Returns:
trueif the value is considered valid, orfalseif it is not valid
-
validateMaxQueueSize
private static int validateMaxQueueSize(Configuration config, Field field, Field.ValidationOutput problems) -
validateSkippedOperation
protected static int validateSkippedOperation(Configuration config, Field field, Field.ValidationOutput problems) -
isUsingAvroConverter
-
snapshotLockingModeCustomName
-
snapshotModeConfigurationBasedSnapshotData
public boolean snapshotModeConfigurationBasedSnapshotData() -
snapshotModeConfigurationBasedSnapshotSchema
public boolean snapshotModeConfigurationBasedSnapshotSchema() -
snapshotModeConfigurationBasedStream
public boolean snapshotModeConfigurationBasedStream() -
snapshotModeConfigurationBasedSnapshotOnSchemaError
public boolean snapshotModeConfigurationBasedSnapshotOnSchemaError() -
snapshotModeConfigurationBasedSnapshotOnDataError
public boolean snapshotModeConfigurationBasedSnapshotOnDataError() -
snapshotQueryMode
-
snapshotQueryModeCustomName
-
getSourceInfoStructMaker
protected abstract SourceInfoStructMaker<?> getSourceInfoStructMaker(CommonConnectorConfig.Version version) Returns the connector-specificSourceInfoStructMakerbased on the given configuration. -
binaryHandlingMode
-
schemaNameAdjuster
-
fieldNameAdjuster
-
getSignalingDataCollectionId
-
getSignalPollInterval
-
getEnabledChannels
-
parseSignallingMessage
-
isSignalDataCollection
-
customRetriableException
-
getMaxRetriesOnError
public int getMaxRetriesOnError() -
getTaskId
-
createHeartbeat
public Heartbeat createHeartbeat(TopicNamingStrategy topicNamingStrategy, SchemaNameAdjuster schemaNameAdjuster, HeartbeatConnectionProvider connectionProvider, HeartbeatErrorHandler errorHandler) -
validateTopicName
public static int validateTopicName(Configuration config, Field field, Field.ValidationOutput problems) -
getSourceInfoStructMaker
public <T extends AbstractSourceInfo> SourceInfoStructMaker<T> getSourceInfoStructMaker(Field sourceInfoStructMakerField, String connector, String version, CommonConnectorConfig connectorConfig)
-