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 enumThe set of predefined modes for dealing with failures during event processing.static enumThe set of predefined SchemaNameAdjustmentMode optionsstatic enumThe set of predefined versions e.g. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringstatic final Fieldprivate final CommonConnectorConfig.BinaryHandlingModeprivate final Configurationprotected static final ConfigDefinitionprivate static final Stringprivate static final Stringstatic final Fieldstatic final Fieldprivate final CustomConverterRegistrystatic final Stringstatic final intstatic final intstatic final longstatic final longstatic final intstatic final longstatic final Stringprivate final booleanstatic final Fieldprivate final CommonConnectorConfig.EventProcessingFailureHandlingModeprivate final Durationprivate final Stringstatic final Fieldstatic final Fieldprivate final booleanprivate final intprivate static final org.slf4j.Loggerprotected final Stringstatic final Fieldstatic final Fieldstatic final Fieldprivate final intprivate final intprivate final longstatic final Stringstatic final Fieldprivate final Durationstatic final Fieldstatic final Fieldprivate final Integerstatic final Fieldprivate final Durationstatic final Fieldprivate final booleanstatic final Fieldprivate final CommonConnectorConfig.SchemaNameAdjustmentModeprivate final booleanstatic final Fieldprivate final Stringstatic final Fieldprivate final EnumSet<Envelope.Operation>static final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprivate final Durationprivate final intprivate final intprivate 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 TypeMethodDescriptioncreateHeartbeat(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>> intintintlongintbooleanintint<T extends AbstractSourceInfo>
SourceInfoStructMaker<T>protected abstract SourceInfoStructMaker<?>Returns the connector-specificSourceInfoStructMakerbased on the given configuration.getTopicNamingStrategy(Field topicNamingStrategyField) getTopicNamingStrategy(Field topicNamingStrategyField, boolean multiPartitionMode) booleanbooleanbooleanbooleanbooleanisSignalDataCollection(DataCollectionId dataCollectionId) private static booleanisUsingAvroConverter(Configuration config) Deprecated.parseSignallingMessage(org.apache.kafka.connect.data.Struct value) booleanbooleanWhether 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:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
CONFLUENT_AVRO_CONVERTER
- See Also:
-
APICURIO_AVRO_CONVERTER
- 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:
-
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
-
SANITIZE_FIELD_NAMES
-
PROVIDE_TRANSACTION_METADATA
-
EVENT_PROCESSING_FAILURE_HANDLING_MODE
-
CUSTOM_CONVERTERS
-
SKIPPED_OPERATIONS
-
BINARY_HANDLING_MODE
-
SCHEMA_NAME_ADJUSTMENT_MODE
-
QUERY_FETCH_SIZE
-
SNAPSHOT_MAX_THREADS
-
SIGNAL_DATA_COLLECTION
-
TOPIC_NAMING_STRATEGY
-
CUSTOM_RETRIABLE_EXCEPTION
-
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 -
queryFetchSize
-
sourceInfoStructMaker
-
sanitizeFieldNames
private final boolean sanitizeFieldNames -
shouldProvideTransactionMetadata
private final boolean shouldProvideTransactionMetadata -
eventProcessingFailureHandlingMode
private final CommonConnectorConfig.EventProcessingFailureHandlingMode eventProcessingFailureHandlingMode -
customConverterRegistry
-
binaryHandlingMode
-
schemaNameAdjustmentMode
-
signalingDataCollection
-
skippedOperations
-
taskId
-
-
Constructor Details
-
CommonConnectorConfig
-
-
Method Details
-
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 -
isEmitTombstoneOnDelete
public boolean isEmitTombstoneOnDelete() -
getMaxQueueSize
public int getMaxQueueSize() -
getMaxBatchSize
public int getMaxBatchSize() -
getMaxQueueSizeInBytes
public long getMaxQueueSizeInBytes() -
getPollInterval
-
getLogicalName
-
getContextName
-
getConnectorName
-
getHeartbeatTopicsPrefix
-
getHeartbeatInterval
-
getRetriableRestartWait
-
getSnapshotDelay
-
getSnapshotFetchSize
public int getSnapshotFetchSize() -
getSnapshotMaxThreads
public int getSnapshotMaxThreads() -
getQueryFetchSize
public int getQueryFetchSize() -
getIncrementalSnashotChunkSize
public int getIncrementalSnashotChunkSize() -
shouldProvideTransactionMetadata
public boolean shouldProvideTransactionMetadata() -
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
-
getSanitizeFieldNames
public boolean getSanitizeFieldNames() -
getSkippedOperations
-
legacyGetDataCollectionsToBeSnapshotted
Deprecated. -
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
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
-
getSourceInfoStructMaker
protected abstract SourceInfoStructMaker<?> getSourceInfoStructMaker(CommonConnectorConfig.Version version) Returns the connector-specificSourceInfoStructMakerbased on the given configuration. -
binaryHandlingMode
-
schemaNameAdjustmentMode
-
getSignalingDataCollectionId
-
parseSignallingMessage
-
isSignalDataCollection
-
customRetriableException
-
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)
-