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 of different ways how connector can capture changes.static enumThe set of predefined CaptureScope options or aliases.static enumThe set of predefined CursorPipelineOrder options or aliases.static enumThe set of predefined CursorPipelineOrder options or aliases.static enumThe set off 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.EventConvertingFailureHandlingMode, CommonConnectorConfig.EventProcessingFailureHandlingMode, CommonConnectorConfig.FieldNameAdjustmentMode, CommonConnectorConfig.SchemaNameAdjustmentMode, CommonConnectorConfig.SnapshotQueryMode, CommonConnectorConfig.Version, CommonConnectorConfig.WatermarkStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic Field.SetThe set ofFields defined as part of this configuration.static final Fieldstatic final Fieldstatic final Fieldprivate final MongoDbAuthProviderprivate final Stringstatic 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 Fieldprivate final com.mongodb.ConnectionStringprivate final intstatic 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 intstatic 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 final intprivate static final org.slf4j.Loggerstatic final Fieldprivate final booleanprivate final MongoDbConnectorConfig.OversizeHandlingModeprivate final intprivate final Stringstatic final Fieldprotected static final Patternprotected static final Stringprotected static final Stringstatic final Fieldprivate final intstatic final Fieldstatic final Fieldprivate final intprivate final MongoDbConnectorConfig.SnapshotModestatic final Fieldprivate final intstatic 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 Stringprotected static final Fieldstatic final Fieldprivate final Stringstatic 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_CONVERTING_FAILURE_HANDLING_MODE, EVENT_PROCESSING_FAILURE_HANDLING_MODE, EXECUTOR_SHUTDOWN_TIMEOUT_SEC, FIELD_NAME_ADJUSTMENT_MODE, INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES, INCREMENTAL_SNAPSHOT_CHUNK_SIZE, INCREMENTAL_SNAPSHOT_WATERMARKING_STRATEGY, isLogPositionCheckEnabled, LOG_POSITION_CHECK_ENABLED, 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_LOCKING_MODE_CUSTOM_NAME, SNAPSHOT_LOCKING_MODE_PROPERTY_NAME, SNAPSHOT_MAX_THREADS, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_DATA, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_ON_DATA_ERROR, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_ON_SCHEMA_ERROR, SNAPSHOT_MODE_CONFIGURATION_BASED_SNAPSHOT_SCHEMA, SNAPSHOT_MODE_CONFIGURATION_BASED_START_STREAM, SNAPSHOT_MODE_CUSTOM_NAME, SNAPSHOT_MODE_PROPERTY_NAME, SNAPSHOT_MODE_TABLES, SNAPSHOT_QUERY_MODE, SNAPSHOT_QUERY_MODE_CUSTOM_NAME, snapshotLockingModeCustomName, snapshotModeConfigurationBasedSnapshotData, snapshotModeConfigurationBasedSnapshotOnDataError, snapshotModeConfigurationBasedSnapshotOnSchemaError, snapshotModeConfigurationBasedSnapshotSchema, snapshotModeConfigurationBasedStream, snapshotQueryMode, snapshotQueryModeCustomName, STREAMING_DELAY_MS, TOMBSTONES_ON_DELETE, TOPIC_NAME_PATTERN, TOPIC_PREFIX, TRANSACTION_METADATA_FACTORY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.common.config.ConfigDefProvides statically configured capture mode.com.mongodb.ConnectionStringintintintintintintintintprotected SourceInfoStructMaker<? extends AbstractSourceInfo>char[]char[]getUser()booleanbooleanisSignalDataCollection(io.debezium.spi.schema.DataCollectionId dataCollectionId) booleanbooleanparseSignallingMessage(org.apache.kafka.connect.data.Struct value) private static com.mongodb.ConnectionStringresolveConnectionString(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 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, getEventConvertingFailureHandlingMode, getEventProcessingFailureHandlingMode, getHeartbeatInterval, getHeartbeatTopicsPrefix, getIncrementalSnapshotChunkSize, getIncrementalSnapshotWatermarkingStrategy, getLogicalName, getMaxBatchSize, getMaxQueueSize, getMaxQueueSizeInBytes, getMaxRetriesOnError, getNotificationTopic, getPollInterval, getQueryFetchSize, getServiceRegistry, getSignalingDataCollectionId, getSignalPollInterval, getSkippedOperations, getSnapshotDelay, getSnapshotFetchSize, getSnapshotModeCustomName, getSourceInfoStructMaker, getSourceInfoStructMaker, getStreamingDelay, getTaskId, getTopicNamingStrategy, getTopicNamingStrategy, getTransactionMetadataFactory, getTransactionMetadataFactory, isEmitTombstoneOnDelete, isIncrementalSnapshotSchemaChangesEnabled, isLogPositionCheckEnabled, isSchemaChangesHistoryEnabled, isSchemaCommentsHistoryEnabled, schemaNameAdjuster, shouldProvideTransactionMetadata, skipMessagesWithoutChange, snapshotLockingModeCustomName, snapshotModeConfigurationBasedSnapshotData, snapshotModeConfigurationBasedSnapshotOnDataError, snapshotModeConfigurationBasedSnapshotOnSchemaError, snapshotModeConfigurationBasedSnapshotSchema, snapshotModeConfigurationBasedStream, snapshotQueryMode, snapshotQueryModeCustomName, 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:
-
ADMIN_DATABASE_NAME
- See Also:
-
DEFAULT_SNAPSHOT_FETCH_SIZE
protected static final int DEFAULT_SNAPSHOT_FETCH_SIZE- See Also:
-
ALLOW_OFFSET_INVALIDATION
-
CONNECTION_STRING
-
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. -
snapshotMode
-
captureMode
-
captureModeFullUpdateType
-
captureScope
-
captureTarget
-
offsetInvalidationAllowed
private final boolean offsetInvalidationAllowed -
snapshotMaxThreads
private final int snapshotMaxThreads -
cursorMaxAwaitTimeMs
private final int cursorMaxAwaitTimeMs -
connectionString
private final com.mongodb.ConnectionString connectionString -
user
-
password
-
authSource
-
authProvider
-
sslEnabled
private final boolean sslEnabled -
sslAllowInvalidHostnames
private final boolean sslAllowInvalidHostnames -
sslKeyStore
-
sslKeyStorePassword
-
sslKeyStoreType
-
sslTrustStore
-
sslTrustStorePassword
-
sslTrustStoreType
-
connectTimeoutMs
private final int connectTimeoutMs -
heartbeatFrequencyMs
private final int heartbeatFrequencyMs -
socketTimeoutMs
private final int socketTimeoutMs -
serverSelectionTimeoutMs
private final int serverSelectionTimeoutMs -
cursorPipelineOrder
-
oversizeHandlingMode
-
filtersMatchMode
-
oversizeSkipThreshold
private final int oversizeSkipThreshold
-
-
Constructor Details
-
MongoDbConnectorConfig
-
-
Method Details
-
configDef
public static org.apache.kafka.common.config.ConfigDef configDef() -
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
- Specified by:
getSnapshotModein classCommonConnectorConfig
-
getSnapshotLockingMode
- Specified by:
getSnapshotLockingModein classCommonConnectorConfig
-
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
-
isOffsetInvalidationAllowed
public boolean isOffsetInvalidationAllowed() -
getConnectionString
public com.mongodb.ConnectionString getConnectionString() -
getUser
-
getPassword
-
getAuthSource
-
getCursorMaxAwaitTimeMs
public int getCursorMaxAwaitTimeMs() -
getAuthProvider
-
isSslEnabled
public boolean isSslEnabled() -
isSslAllowInvalidHostnames
public boolean isSslAllowInvalidHostnames() -
getSslKeyStore
-
getSslKeyStorePassword
public char[] getSslKeyStorePassword() -
getSslKeyStoreType
-
getSslTrustStore
-
getSslTrustStorePassword
public char[] getSslTrustStorePassword() -
getSslTrustStoreType
-
getConnectTimeoutMs
public int getConnectTimeoutMs() -
getHeartbeatFrequencyMs
public int getHeartbeatFrequencyMs() -
getSocketTimeoutMs
public int getSocketTimeoutMs() -
getServerSelectionTimeoutMs
public int getServerSelectionTimeoutMs() -
getCursorMaxAwaitTime
public int getCursorMaxAwaitTime() -
getCursorPipelineOrder
-
getOversizeHandlingMode
-
getOversizeSkipThreshold
public int getOversizeSkipThreshold() -
getFiltersMatchMode
-
getSnapshotMaxThreads
public int getSnapshotMaxThreads()- Overrides:
getSnapshotMaxThreadsin classCommonConnectorConfig
-
getSourceInfoStructMaker
protected SourceInfoStructMaker<? extends AbstractSourceInfo> getSourceInfoStructMaker(CommonConnectorConfig.Version version) - Specified by:
getSourceInfoStructMakerin classCommonConnectorConfig
-
getSnapshotFilterQueryByCollection
-
supportsOperationFiltering
public boolean supportsOperationFiltering()- Overrides:
supportsOperationFilteringin classCommonConnectorConfig
-
getContextName
- Specified by:
getContextNamein classCommonConnectorConfig
-
getConnectorName
- Specified by:
getConnectorNamein classCommonConnectorConfig
-
resolveSnapshotMaxThreads
-
resolveConnectionString
-
parseSignallingMessage
- Overrides:
parseSignallingMessagein classCommonConnectorConfig
-
isSignalDataCollection
public boolean isSignalDataCollection(io.debezium.spi.schema.DataCollectionId dataCollectionId) - Overrides:
isSignalDataCollectionin classCommonConnectorConfig
-