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 SnapshotMode options or aliases.Nested classes/interfaces inherited from class io.debezium.config.CommonConnectorConfig
CommonConnectorConfig.BinaryHandlingMode, CommonConnectorConfig.EventProcessingFailureHandlingMode, CommonConnectorConfig.SchemaNameAdjustmentMode, CommonConnectorConfig.Version -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic Field.SetThe set ofFields defined as part of this configuration.static final Fieldstatic final Fieldstatic final Fieldstatic 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 Fieldstatic final Fieldprivate final intstatic 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 FieldThe comma-separated list of hostname and port pairs (in the form 'host' or 'host:port') of the MongoDB servers in the replica set.private static final org.slf4j.Loggerstatic final Fieldstatic final Fieldstatic final Fieldstatic final Fieldprotected static final Patternprotected static final Stringprotected static final Stringstatic final Fieldstatic final Fieldstatic final Fieldprivate final intprivate final MongoDbConnectorConfig.SnapshotModestatic final Fieldstatic final Fieldstatic final Fieldprotected static final Fieldstatic final Fieldstatic final FieldFields inherited from class io.debezium.config.CommonConnectorConfig
BINARY_HANDLING_MODE, CUSTOM_CONVERTERS, CUSTOM_RETRIABLE_EXCEPTION, DATABASE_CONFIG_PREFIX, DEFAULT_MAX_BATCH_SIZE, DEFAULT_MAX_QUEUE_SIZE, DEFAULT_MAX_QUEUE_SIZE_IN_BYTES, DEFAULT_POLL_INTERVAL_MILLIS, DEFAULT_QUERY_FETCH_SIZE, DEFAULT_RETRIABLE_RESTART_WAIT, EVENT_PROCESSING_FAILURE_HANDLING_MODE, INCREMENTAL_SNAPSHOT_ALLOW_SCHEMA_CHANGES, INCREMENTAL_SNAPSHOT_CHUNK_SIZE, MAX_BATCH_SIZE, MAX_QUEUE_SIZE, MAX_QUEUE_SIZE_IN_BYTES, MULTI_PARTITION_MODE, POLL_INTERVAL_MS, PROVIDE_TRANSACTION_METADATA, QUERY_FETCH_SIZE, RETRIABLE_RESTART_WAIT, SANITIZE_FIELD_NAMES, SCHEMA_NAME_ADJUSTMENT_MODE, SIGNAL_DATA_COLLECTION, SKIPPED_OPERATIONS, SNAPSHOT_DELAY_MS, SNAPSHOT_FETCH_SIZE, SNAPSHOT_MAX_THREADS, SNAPSHOT_MODE_TABLES, TOMBSTONES_ON_DELETE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.kafka.common.config.ConfigDefProvides statically configured capture mode.intgetSnapshotFilterQueryForCollection(CollectionId collectionId) intprotected SourceInfoStructMaker<? extends AbstractSourceInfo>booleanisSignalDataCollection(io.debezium.spi.schema.DataCollectionId dataCollectionId) parseSignallingMessage(org.apache.kafka.connect.data.Struct value) private static intbooleanprivate static intvalidateCollectionExcludeList(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) Methods inherited from class io.debezium.config.CommonConnectorConfig
binaryHandlingMode, createHeartbeat, customConverterRegistry, customRetriableException, getConfig, getDataCollectionsToBeSnapshotted, getEventProcessingFailureHandlingMode, getHeartbeatInterval, getHeartbeatTopicsPrefix, getIncrementalSnashotChunkSize, getLogicalName, getMaxBatchSize, getMaxQueueSize, getMaxQueueSizeInBytes, getPollInterval, getQueryFetchSize, getRetriableRestartWait, getSanitizeFieldNames, getSignalingDataCollectionId, getSkippedOperations, getSnapshotDelay, getSnapshotFetchSize, getSourceInfoStructMaker, getTaskId, getTopicNamingStrategy, getTopicNamingStrategy, isEmitTombstoneOnDelete, isIncrementalSnapshotSchemaChangesEnabled, isSchemaChangesHistoryEnabled, isSchemaCommentsHistoryEnabled, legacyGetDataCollectionsToBeSnapshotted, schemaNameAdjustmentMode, shouldProvideTransactionMetadata, supportsSchemaChangesDuringIncrementalSnapshot, validate, validateAndRecord, validateSkippedOperation
-
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:
-
DEFAULT_SNAPSHOT_FETCH_SIZE
protected static final int DEFAULT_SNAPSHOT_FETCH_SIZE- See Also:
-
HOSTS
The comma-separated list of hostname and port pairs (in the form 'host' or 'host:port') of the MongoDB servers in the replica set. -
LOGICAL_NAME
-
USER
-
PASSWORD
-
AUTH_SOURCE
-
MONGODB_POLL_INTERVAL_MS
-
SSL_ENABLED
-
SSL_ALLOW_INVALID_HOSTNAMES
-
CONNECT_BACKOFF_INITIAL_DELAY_MS
-
CONNECT_BACKOFF_MAX_DELAY_MS
-
MAX_FAILED_CONNECTIONS
-
AUTO_DISCOVER_MEMBERS
-
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. -
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. -
SNAPSHOT_MODE
-
CAPTURE_MODE
-
CONNECT_TIMEOUT_MS
-
SERVER_SELECTION_TIMEOUT_MS
-
SOCKET_TIMEOUT_MS
-
TASK_ID
-
SNAPSHOT_FILTER_QUERY_BY_COLLECTION
-
CURSOR_MAX_AWAIT_TIME_MS
-
TOPIC_NAMING_STRATEGY
-
CONFIG_DEFINITION
-
ALL_FIELDS
The set ofFields defined as part of this configuration. -
EXPOSED_FIELDS
-
snapshotMode
-
captureMode
-
snapshotMaxThreads
private final int snapshotMaxThreads -
cursorMaxAwaitTimeMs
private final int cursorMaxAwaitTimeMs
-
-
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) -
validateFieldExcludeList
private static int validateFieldExcludeList(Configuration config, Field field, Field.ValidationOutput problems) -
validateFieldRenamesList
private static int validateFieldRenamesList(Configuration config, 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) -
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
-
getCursorMaxAwaitTime
public int getCursorMaxAwaitTime() -
getSnapshotMaxThreads
public int getSnapshotMaxThreads()- Overrides:
getSnapshotMaxThreadsin classCommonConnectorConfig
-
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
-
parseSignallingMessage
- Overrides:
parseSignallingMessagein classCommonConnectorConfig
-
isSignalDataCollection
public boolean isSignalDataCollection(io.debezium.spi.schema.DataCollectionId dataCollectionId) - Overrides:
isSignalDataCollectionin classCommonConnectorConfig
-