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
Modifier and TypeClassDescriptionstatic enum
The set of predefined BinaryHandlingMode options or aliasesstatic enum
The set of predefined modes for dealing with failures during event processing.static enum
The set of predefined FieldNameAdjustmentMode optionsstatic enum
The set of predefined SchemaNameAdjustmentMode optionsstatic enum
The set of predefined versions e.g. -
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
static final Field
private final CommonConnectorConfig.BinaryHandlingMode
private final Configuration
protected static final ConfigDefinition
private static final String
private static final String
static final Field
static final Field
private final CustomConverterRegistry
static final String
static final int
static final int
static final long
static final long
static final int
static final long
static final String
private final boolean
static final Field
private final CommonConnectorConfig.EventProcessingFailureHandlingMode
static final Field
private final CommonConnectorConfig.FieldNameAdjustmentMode
private final Duration
private final String
static final Field
static final Field
private final boolean
private final int
private static final org.slf4j.Logger
protected final String
static final Field
static final Field
static final Field
private final int
private final int
private final long
static final String
static final Field
private final Duration
static final Field
static final Field
private final Integer
static final Field
private final Duration
static final Field
private final CommonConnectorConfig.SchemaNameAdjustmentMode
private final boolean
static final Field
private final String
static final Field
private final EnumSet<Envelope.Operation>
static final Field
static final Field
static final Field
static final Field
private final Duration
private final int
private final int
private final SourceInfoStructMaker<? extends AbstractSourceInfo>
static final String
private final String
static final Field
static final Pattern
static final Field
static final Field
-
Constructor Summary
ModifierConstructorDescriptionprotected
CommonConnectorConfig
(Configuration config, int defaultSnapshotFetchSize) -
Method Summary
Modifier and TypeMethodDescriptioncreateHeartbeat
(TopicNamingStrategy topicNamingStrategy, SchemaNameAdjuster schemaNameAdjuster, HeartbeatConnectionProvider connectionProvider, HeartbeatErrorHandler errorHandler) private static EnumSet<Envelope.Operation>
Deprecated.abstract String
abstract String
private List<CustomConverter<org.apache.kafka.connect.data.SchemaBuilder,
ConvertedField>> int
int
int
long
int
int
int
<T extends AbstractSourceInfo>
SourceInfoStructMaker<T>protected abstract SourceInfoStructMaker<?>
Returns the connector-specificSourceInfoStructMaker
based on the given configuration.getTopicNamingStrategy
(Field topicNamingStrategyField) getTopicNamingStrategy
(Field topicNamingStrategyField, boolean multiPartitionMode) boolean
boolean
boolean
boolean
boolean
isSignalDataCollection
(DataCollectionId dataCollectionId) private static boolean
isUsingAvroConverter
(Configuration config) parseSignallingMessage
(org.apache.kafka.connect.data.Struct value) boolean
boolean
Whether a particular connector supports an optimized way for implementing operation skipping, or not.protected boolean
boolean
validate
(Iterable<Field> fields, Field.ValidationOutput problems) Validates the supplied fields in this configuration.boolean
validateAndRecord
(Iterable<Field> fields, Consumer<String> problems) Validate the supplied fields in this configuration.private static int
validateMaxQueueSize
(Configuration config, Field field, Field.ValidationOutput problems) protected static int
validateSkippedOperation
(Configuration config, Field field, Field.ValidationOutput problems) static int
validateTopicName
(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
-
PROVIDE_TRANSACTION_METADATA
-
EVENT_PROCESSING_FAILURE_HANDLING_MODE
-
CUSTOM_CONVERTERS
-
SKIPPED_OPERATIONS
-
BINARY_HANDLING_MODE
-
SCHEMA_NAME_ADJUSTMENT_MODE
-
FIELD_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
-
shouldProvideTransactionMetadata
private final boolean shouldProvideTransactionMetadata -
eventProcessingFailureHandlingMode
private final CommonConnectorConfig.EventProcessingFailureHandlingMode eventProcessingFailureHandlingMode -
customConverterRegistry
-
binaryHandlingMode
-
schemaNameAdjustmentMode
-
fieldNameAdjustmentMode
-
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
-
getSkippedOperations
-
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 suppliedfields
parameter will not be validated.- Parameters:
fields
- the fieldsproblems
- the consumer to eb called with each problem; never null- Returns:
true
if the value is considered valid, orfalse
if it is not valid
-
validateAndRecord
Validate the supplied fields in this configuration. Extra fields not described by the suppliedfields
parameter will not be validated.- Parameters:
fields
- the fieldsproblems
- the consumer to be called with each problem; never null- Returns:
true
if the value is considered valid, orfalse
if 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-specificSourceInfoStructMaker
based on the given configuration. -
binaryHandlingMode
-
schemaNameAdjuster
-
fieldNameAdjuster
-
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)
-