Package io.debezium.connector.mongodb
Class MongoDbConnectorConfig
java.lang.Object
io.debezium.config.CommonConnectorConfig
io.debezium.connector.mongodb.MongoDbConnectorConfig
The configuration properties.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe set off different ways how connector can capture changes.static enumThe set of predefined CaptureScope options or aliases.static enumThe set of predefined MongoDbConnectionMode options or aliases.static enumThe set of predefined CursorPipelineOrder options or aliases.static enumThe set of predefined CursorPipelineOrder options or aliases.static enumThe set of different ways how connector performs full updatestatic enumThe set of predefined OversizeHandlingMode options or aliases.static enumThe set of predefined SnapshotMode options or aliases.Nested classes/interfaces inherited from class io.debezium.config.CommonConnectorConfig
CommonConnectorConfig.BinaryHandlingMode, CommonConnectorConfig.EventProcessingFailureHandlingMode, CommonConnectorConfig.FieldNameAdjustmentMode, CommonConnectorConfig.SchemaNameAdjustmentMode, CommonConnectorConfig.Version, CommonConnectorConfig.WatermarkStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Field.SetThe set ofFields defined as part of this configuration.static final FieldTheReplicaSets.SEPARATOR-separated list of connection stringsstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprivate final MongoDbConnectorConfig.CaptureModeprivate final MongoDbConnectorConfig.FullUpdateTypeprivate final MongoDbConnectorConfig.CaptureScopeprivate final Stringstatic final FieldA comma-separated list of regular expressions that match the fully-qualified namespaces of collections to be excluded from monitoring.static final FieldA comma-separated list of regular expressions that match the fully-qualified namespaces of collections to be monitored.protected static final Stringprivate static final ConfigDefinitionstatic final Fieldstatic final Fieldstatic final Fieldprivate final MongoDbConnectorConfig.ConnectionModestatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprivate final intprivate final MongoDbConnectorConfig.CursorPipelineOrderstatic final FieldA comma-separated list of regular expressions that match the databases to be excluded.static final FieldA comma-separated list of regular expressions that match the databases to be monitored.protected static final Stringprotected static final intprotected static Field.Setstatic final FieldA comma-separated list of the fully-qualified names of fields that should be excluded from change event message values.protected static final Patternstatic final FieldA comma-separated list of the fully-qualified replacements of fields that should be used to rename fields in change event message values.protected static final Patternstatic final Fieldprivate final MongoDbConnectorConfig.FiltersMatchModestatic final Fieldprivate static final org.slf4j.Loggerstatic final Fieldprivate final booleanprivate final MongoDbConnectorConfig.OversizeHandlingModeprivate final intstatic final Fieldprotected static final Patternprotected static final Stringprotected static final Stringprivate final ReplicaSetsstatic final Fieldstatic final Fieldprivate final Stringstatic final Fieldstatic final Fieldprivate final intprivate final MongoDbConnectorConfig.SnapshotModestatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprivate final booleanprivate final booleanprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringprivate final Stringstatic final FieldTheReplicaSets.SEPARATOR-separated list of connection stringsprotected static final Fieldstatic final Fieldstatic final FieldFields inherited from class io.debezium.config.CommonConnectorConfig
beanRegistry, BINARY_HANDLING_MODE, CUSTOM_CONVERTERS, CUSTOM_METRIC_TAGS, CUSTOM_POST_PROCESSORS, CUSTOM_RETRIABLE_EXCEPTION, DATABASE_CONFIG_PREFIX, DEFAULT_MAX_BATCH_SIZE, DEFAULT_MAX_QUEUE_SIZE, DEFAULT_MAX_QUEUE_SIZE_IN_BYTES, DEFAULT_MAX_RETRIES, DEFAULT_POLL_INTERVAL_MILLIS, DEFAULT_QUERY_FETCH_SIZE, DEFAULT_RETRIABLE_RESTART_WAIT, DRIVER_CONFIG_PREFIX, ERRORS_MAX_RETRIES, EVENT_PROCESSING_FAILURE_HANDLING_MODE, FIELD_NAME_ADJUSTMENT_MODE, INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES, INCREMENTAL_SNAPSHOT_CHUNK_SIZE, INCREMENTAL_SNAPSHOT_WATERMARKING_STRATEGY, logicalName, MAX_BATCH_SIZE, MAX_QUEUE_SIZE, MAX_QUEUE_SIZE_IN_BYTES, MAX_RETRIES_ON_ERROR, MULTI_PARTITION_MODE, NOTIFICATION_CONFIGURATION_FIELD_PREFIX_STRING, NOTIFICATION_ENABLED_CHANNELS, POLL_INTERVAL_MS, PROVIDE_TRANSACTION_METADATA, QUERY_FETCH_SIZE, RETRIABLE_RESTART_WAIT, SCHEMA_NAME_ADJUSTMENT_MODE, serviceRegistry, SIGNAL_DATA_COLLECTION, SIGNAL_ENABLED_CHANNELS, SIGNAL_POLL_INTERVAL_MS, SKIP_MESSAGES_WITHOUT_CHANGE, SKIPPED_OPERATIONS, SNAPSHOT_DELAY_MS, SNAPSHOT_FETCH_SIZE, SNAPSHOT_MAX_THREADS, SNAPSHOT_MODE_TABLES, TOMBSTONES_ON_DELETE, TOPIC_NAME_PATTERN, TOPIC_PREFIX -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.common.config.ConfigDefProvides statically configured capture mode.intintgetSnapshotFilterQueryForCollection(CollectionId collectionId) intprotected SourceInfoStructMaker<? extends AbstractSourceInfo>char[]char[]booleanbooleanisSignalDataCollection(io.debezium.spi.schema.DataCollectionId dataCollectionId) booleanbooleanparseSignallingMessage(org.apache.kafka.connect.data.Struct value) private static ReplicaSetsresolveReplicaSets(Configuration config) private static intbooleanprivate static intvalidateCaptureTarget(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateChangeStreamPipeline(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateCollectionExcludeList(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateConnectionString(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateDatabaseExcludeList(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateFieldExcludeList(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateFieldRenamesList(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateHosts(Configuration config, Field field, Field.ValidationOutput problems) private static intvalidateListOfRegexesOrLiterals(Configuration configuration, Field field, Field.ValidationOutput problems) private static intvalidateOversizeSkipThreshold(Configuration config, Field field, Field.ValidationOutput problems) Methods inherited from class io.debezium.config.CommonConnectorConfig
binaryHandlingMode, createCustomMetricTags, createHeartbeat, customConverterRegistry, customRetriableException, fieldNameAdjuster, getBeanRegistry, getConfig, getCustomMetricTags, getDataCollectionsToBeSnapshotted, getEnabledChannels, getEnabledNotificationChannels, getEventProcessingFailureHandlingMode, getHeartbeatInterval, getHeartbeatTopicsPrefix, getIncrementalSnapshotChunkSize, getIncrementalSnapshotWatermarkingStrategy, getLogicalName, getMaxBatchSize, getMaxQueueSize, getMaxQueueSizeInBytes, getMaxRetriesOnError, getNotificationTopic, getPollInterval, getQueryFetchSize, getRetriableRestartWait, getServiceRegistry, getSignalingDataCollectionId, getSignalPollInterval, getSkippedOperations, getSnapshotDelay, getSnapshotFetchSize, getSourceInfoStructMaker, getSourceInfoStructMaker, getTaskId, getTopicNamingStrategy, getTopicNamingStrategy, isEmitTombstoneOnDelete, isIncrementalSnapshotSchemaChangesEnabled, isSchemaChangesHistoryEnabled, isSchemaCommentsHistoryEnabled, schemaNameAdjuster, shouldProvideTransactionMetadata, skipMessagesWithoutChange, supportsSchemaChangesDuringIncrementalSnapshot, validate, validateAndRecord, validateSkippedOperation, validateTopicName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
COLLECTION_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
- See Also:
-
DATABASE_INCLUDE_LIST_ALREADY_SPECIFIED_ERROR_MSG
- See Also:
-
PATTERN_SPILT
-
FIELD_EXCLUDE_LIST_PATTERN
-
QUALIFIED_FIELD_EXCLUDE_LIST_PATTERN
- See Also:
-
FIELD_RENAMES_PATTERN
-
QUALIFIED_FIELD_RENAMES_PATTERN
- See Also:
-
shardConnectionParameters
-
DEFAULT_SNAPSHOT_FETCH_SIZE
protected static final int DEFAULT_SNAPSHOT_FETCH_SIZE- See Also:
-
TASK_CONNECTION_STRINGS
TheReplicaSets.SEPARATOR-separated list of connection strings -
ALLOW_OFFSET_INVALIDATION
TheReplicaSets.SEPARATOR-separated list of connection strings -
CONNECTION_STRING
-
SHARD_CONNECTION_PARAMS
-
CONNECTION_MODE
-
USER
-
PASSWORD
-
MONGODB_POLL_INTERVAL_MS
-
SSL_ENABLED
-
SSL_ALLOW_INVALID_HOSTNAMES
-
SSL_KEYSTORE
-
SSL_KEYSTORE_PASSWORD
-
SSL_KEYSTORE_TYPE
-
SSL_TRUSTSTORE
-
SSL_TRUSTSTORE_PASSWORD
-
SSL_TRUSTSTORE_TYPE
-
CONNECT_TIMEOUT_MS
-
AUTH_SOURCE
-
SERVER_SELECTION_TIMEOUT_MS
-
SOCKET_TIMEOUT_MS
-
HEARTBEAT_FREQUENCY_MS
-
AUTH_PROVIDER_CLASS
-
DATABASE_INCLUDE_LIST
A comma-separated list of regular expressions that match the databases to be monitored. Must not be used withDATABASE_EXCLUDE_LIST. -
DATABASE_EXCLUDE_LIST
A comma-separated list of regular expressions that match the databases to be excluded. Must not be used withDATABASE_INCLUDE_LIST. -
COLLECTION_INCLUDE_LIST
A comma-separated list of regular expressions that match the fully-qualified namespaces of collections to be monitored. Fully-qualified namespaces for collections are of the form<databaseName>.<collectionName>. Must not be used withCOLLECTION_EXCLUDE_LIST. -
COLLECTION_EXCLUDE_LIST
A comma-separated list of regular expressions that match the fully-qualified namespaces of collections to be excluded from monitoring. Fully-qualified namespaces for collections are of the form<databaseName>.<collectionName>. Must not be used withCOLLECTION_INCLUDE_LIST. -
FILTERS_MATCH_MODE
-
FIELD_EXCLUDE_LIST
A comma-separated list of the fully-qualified names of fields that should be excluded from change event message values. Fully-qualified names for fields are of the form<databaseName>.<collectionName>.<fieldName>.<nestedFieldName>, where<databaseName>and<collectionName>may contain the wildcard (*) which matches any characters. -
FIELD_RENAMES
A comma-separated list of the fully-qualified replacements of fields that should be used to rename fields in change event message values. Fully-qualified replacements for fields are of the form<databaseName>.<collectionName>.<fieldName>.<nestedFieldName>:<newNestedFieldName>, where<databaseName>and<collectionName>may contain the wildcard (*) which matches any characters, the colon character (:) is used to determine rename mapping of field. -
CAPTURE_MODE
-
CAPTURE_MODE_FULL_UPDATE_TYPE
-
CAPTURE_SCOPE
-
CAPTURE_TARGET
-
TASK_ID
-
SNAPSHOT_MODE
-
SNAPSHOT_FILTER_QUERY_BY_COLLECTION
-
CURSOR_MAX_AWAIT_TIME_MS
-
CURSOR_PIPELINE
-
CURSOR_PIPELINE_ORDER
-
CURSOR_OVERSIZE_HANDLING_MODE
-
CURSOR_OVERSIZE_SKIP_THRESHOLD
-
TOPIC_NAMING_STRATEGY
-
SOURCE_INFO_STRUCT_MAKER
-
CONFIG_DEFINITION
-
ALL_FIELDS
The set ofFields defined as part of this configuration. -
EXPOSED_FIELDS
-
snapshotMode
-
captureMode
-
captureModeFullUpdateType
-
captureScope
-
captureTarget
-
connectionMode
-
offsetInvalidationAllowed
private final boolean offsetInvalidationAllowed -
snapshotMaxThreads
private final int snapshotMaxThreads -
cursorMaxAwaitTimeMs
private final int cursorMaxAwaitTimeMs -
replicaSets
-
cursorPipelineOrder
-
oversizeHandlingMode
-
filtersMatchMode
-
oversizeSkipThreshold
private final int oversizeSkipThreshold -
sslEnabled
private final boolean sslEnabled -
sslAllowInvalidHostnames
private final boolean sslAllowInvalidHostnames -
sslKeyStore
-
sslKeyStorePassword
-
sslKeyStoreType
-
sslTrustStore
-
sslTrustStorePassword
-
sslTrustStoreType
-
-
Constructor Details
-
MongoDbConnectorConfig
-
-
Method Details
-
configDef
public static org.apache.kafka.common.config.ConfigDef configDef() -
validateHosts
private static int validateHosts(Configuration config, Field field, Field.ValidationOutput problems) -
validateChangeStreamPipeline
private static int validateChangeStreamPipeline(Configuration config, Field field, Field.ValidationOutput problems) -
validateOversizeSkipThreshold
private static int validateOversizeSkipThreshold(Configuration config, Field field, Field.ValidationOutput problems) -
validateConnectionString
private static int validateConnectionString(Configuration config, Field field, Field.ValidationOutput problems) -
validateFieldExcludeList
private static int validateFieldExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
validateFieldRenamesList
private static int validateFieldRenamesList(Configuration config, Field field, Field.ValidationOutput problems) -
validateListOfRegexesOrLiterals
private static int validateListOfRegexesOrLiterals(Configuration configuration, Field field, Field.ValidationOutput problems) -
validateCollectionExcludeList
private static int validateCollectionExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
validateDatabaseExcludeList
private static int validateDatabaseExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
validateCaptureTarget
private static int validateCaptureTarget(Configuration config, Field field, Field.ValidationOutput problems) -
getSnapshotMode
-
getCaptureMode
Provides statically configured capture mode. The configured value can be overrided upon connector start if offsets stored were created by a different capture mode. SeeMongoDbTaskContext.getCaptureMode()- Returns:
- capture mode requested by configuration
-
getCaptureModeFullUpdateType
-
getCaptureScope
-
getCaptureTarget
-
getConnectionMode
-
isOffsetInvalidationAllowed
public boolean isOffsetInvalidationAllowed() -
getShardConnectionParameters
-
getReplicaSets
-
getCursorMaxAwaitTime
public int getCursorMaxAwaitTime() -
getCursorPipelineOrder
-
getOversizeHandlingMode
-
getOversizeSkipThreshold
public int getOversizeSkipThreshold() -
getFiltersMatchMode
-
getSnapshotMaxThreads
public int getSnapshotMaxThreads()- Overrides:
getSnapshotMaxThreadsin classCommonConnectorConfig
-
isSslEnabled
public boolean isSslEnabled() -
isSslAllowInvalidHostnames
public boolean isSslAllowInvalidHostnames() -
getSslKeyStore
-
getSslKeyStorePassword
public char[] getSslKeyStorePassword() -
getSslKeyStoreType
-
getSslTrustStore
-
getSslTrustStorePassword
public char[] getSslTrustStorePassword() -
getSslTrustStoreType
-
getSourceInfoStructMaker
protected SourceInfoStructMaker<? extends AbstractSourceInfo> getSourceInfoStructMaker(CommonConnectorConfig.Version version) - Specified by:
getSourceInfoStructMakerin classCommonConnectorConfig
-
getSnapshotFilterQueryForCollection
-
getSnapshotFilterQueryByCollection
-
supportsOperationFiltering
public boolean supportsOperationFiltering()- Overrides:
supportsOperationFilteringin classCommonConnectorConfig
-
getContextName
- Specified by:
getContextNamein classCommonConnectorConfig
-
getConnectorName
- Specified by:
getConnectorNamein classCommonConnectorConfig
-
resolveSnapshotMaxThreads
-
resolveReplicaSets
-
parseSignallingMessage
- Overrides:
parseSignallingMessagein classCommonConnectorConfig
-
isSignalDataCollection
public boolean isSignalDataCollection(io.debezium.spi.schema.DataCollectionId dataCollectionId) - Overrides:
isSignalDataCollectionin classCommonConnectorConfig
-