Class MongoDbConnectorEmbeddedDebeziumConfiguration

  • All Implemented Interfaces:
    Cloneable

    @UriParams
    public class MongoDbConnectorEmbeddedDebeziumConfiguration
    extends org.apache.camel.component.debezium.configuration.EmbeddedDebeziumConfiguration
    • Constructor Detail

      • MongoDbConnectorEmbeddedDebeziumConfiguration

        public MongoDbConnectorEmbeddedDebeziumConfiguration()
    • Method Detail

      • setMongodbPassword

        public void setMongodbPassword​(String mongodbPassword)
        Password to be used when connecting to MongoDB, if necessary.
      • getMongodbPassword

        public String getMongodbPassword()
      • setQueryFetchSize

        public void setQueryFetchSize​(int queryFetchSize)
        The maximum number of records that should be loaded into memory while streaming. A value of `0` uses the default JDBC fetch size.
      • getQueryFetchSize

        public int getQueryFetchSize()
      • setMongodbSslEnabled

        public void setMongodbSslEnabled​(boolean mongodbSslEnabled)
        Should connector use SSL to connect to MongoDB instances
      • isMongodbSslEnabled

        public boolean isMongodbSslEnabled()
      • setCursorMaxAwaitTimeMs

        public void setCursorMaxAwaitTimeMs​(int cursorMaxAwaitTimeMs)
        The maximum processing time in milliseconds to wait for the oplog cursor to process a single poll request
      • getCursorMaxAwaitTimeMs

        public int getCursorMaxAwaitTimeMs()
      • setMongodbMembersAutoDiscover

        public void setMongodbMembersAutoDiscover​(boolean mongodbMembersAutoDiscover)
        Specifies whether the addresses in 'hosts' are seeds that should be used to discover all members of the cluster or replica set ('true'), or whether the address(es) in 'hosts' should be used as is ('false'). The default is 'true'.
      • isMongodbMembersAutoDiscover

        public boolean isMongodbMembersAutoDiscover()
      • setFieldRenames

        public void setFieldRenames​(String fieldRenames)
        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.
      • getFieldRenames

        public String getFieldRenames()
      • setMongodbServerSelectionTimeoutMs

        public void setMongodbServerSelectionTimeoutMs​(int mongodbServerSelectionTimeoutMs)
        The server selection timeout, given in milliseconds. Defaults to 10 seconds (10,000 ms).
      • getMongodbServerSelectionTimeoutMs

        public int getMongodbServerSelectionTimeoutMs()
      • setPollIntervalMs

        public void setPollIntervalMs​(long pollIntervalMs)
        Time to wait for new change events to appear after receiving no events, given in milliseconds. Defaults to 500 ms.
      • getPollIntervalMs

        public long getPollIntervalMs()
      • setSignalDataCollection

        public void setSignalDataCollection​(String signalDataCollection)
        The name of the data collection that is used to send signals/commands to Debezium. Signaling is disabled when not set.
      • getSignalDataCollection

        public String getSignalDataCollection()
      • setConverters

        public void setConverters​(String converters)
        Optional list of custom converters that would be used instead of default ones. The converters are defined using '.type' config option and configured using options '.
      • getConverters

        public String getConverters()
      • setHeartbeatTopicsPrefix

        public void setHeartbeatTopicsPrefix​(String heartbeatTopicsPrefix)
        The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat.
      • getHeartbeatTopicsPrefix

        public String getHeartbeatTopicsPrefix()
      • setMongodbConnectTimeoutMs

        public void setMongodbConnectTimeoutMs​(int mongodbConnectTimeoutMs)
        The connection timeout, given in milliseconds. Defaults to 10 seconds (10,000 ms).
      • getMongodbConnectTimeoutMs

        public int getMongodbConnectTimeoutMs()
      • setMongodbHosts

        public void setMongodbHosts​(String mongodbHosts)
        The hostname and port pairs (in the form 'host' or 'host:port') of the MongoDB server(s) in the replica set.
      • getMongodbHosts

        public String getMongodbHosts()
      • setSnapshotFetchSize

        public void setSnapshotFetchSize​(int snapshotFetchSize)
        The maximum number of records that should be loaded into memory while performing a snapshot
      • getSnapshotFetchSize

        public int getSnapshotFetchSize()
      • setMongodbPollIntervalMs

        public void setMongodbPollIntervalMs​(long mongodbPollIntervalMs)
        Interval for looking for new, removed, or changed replica sets, given in milliseconds. Defaults to 30 seconds (30,000 ms).
      • getMongodbPollIntervalMs

        public long getMongodbPollIntervalMs()
      • setSanitizeFieldNames

        public void setSanitizeFieldNames​(boolean sanitizeFieldNames)
        Whether field names will be sanitized to Avro naming conventions
      • isSanitizeFieldNames

        public boolean isSanitizeFieldNames()
      • setMongodbUser

        public void setMongodbUser​(String mongodbUser)
        Database user for connecting to MongoDB, if necessary.
      • getMongodbUser

        public String getMongodbUser()
      • setSourceStructVersion

        public void setSourceStructVersion​(String sourceStructVersion)
        A version of the format of the publicly visible source part in the message
      • getSourceStructVersion

        public String getSourceStructVersion()
      • setHeartbeatIntervalMs

        public void setHeartbeatIntervalMs​(int heartbeatIntervalMs)
        Length of an interval in milli-seconds in in which the connector periodically sends heartbeat messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default.
      • getHeartbeatIntervalMs

        public int getHeartbeatIntervalMs()
      • setSnapshotCollectionFilterOverrides

        public void setSnapshotCollectionFilterOverrides​(String snapshotCollectionFilterOverrides)
        This property contains a comma-separated list of ., for which the initial snapshot may be a subset of data present in the data source. The subset would be defined by mongodb filter query specified as value for property snapshot.collection.filter.override..
      • getSnapshotCollectionFilterOverrides

        public String getSnapshotCollectionFilterOverrides()
      • setFieldExcludeList

        public void setFieldExcludeList​(String fieldExcludeList)
        A comma-separated list of the fully-qualified names of fields that should be excluded from change event message values
      • getFieldExcludeList

        public String getFieldExcludeList()
      • setDatabaseExcludeList

        public void setDatabaseExcludeList​(String databaseExcludeList)
        A comma-separated list of regular expressions that match the database names for which changes are to be excluded
      • getDatabaseExcludeList

        public String getDatabaseExcludeList()
      • setMaxBatchSize

        public void setMaxBatchSize​(int maxBatchSize)
        Maximum size of each batch of source records. Defaults to 2048.
      • getMaxBatchSize

        public int getMaxBatchSize()
      • setSkippedOperations

        public void setSkippedOperations​(String skippedOperations)
        The comma-separated list of operations to skip during streaming, defined as: 'c' for inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate nothing skipped. By default, no operations will be skipped.
      • getSkippedOperations

        public String getSkippedOperations()
      • setSnapshotMode

        public void setSnapshotMode​(String snapshotMode)
        The criteria for running a snapshot upon startup of the connector. Options include: 'initial' (the default) to specify the connector should always perform an initial sync when required; 'never' to specify the connector should never perform an initial sync
      • getSnapshotMode

        public String getSnapshotMode()
      • setMaxQueueSize

        public void setMaxQueueSize​(int maxQueueSize)
        Maximum size of the queue for change events read from the database log but not yet recorded or forwarded. Defaults to 8192, and should always be larger than the maximum batch size.
      • getMaxQueueSize

        public int getMaxQueueSize()
      • setCollectionIncludeList

        public void setCollectionIncludeList​(String collectionIncludeList)
        A comma-separated list of regular expressions that match the collection names for which changes are to be captured
      • getCollectionIncludeList

        public String getCollectionIncludeList()
      • setRetriableRestartConnectorWaitMs

        public void setRetriableRestartConnectorWaitMs​(long retriableRestartConnectorWaitMs)
        Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms.
      • getRetriableRestartConnectorWaitMs

        public long getRetriableRestartConnectorWaitMs()
      • setCaptureMode

        public void setCaptureMode​(String captureMode)
        The method used to capture changes from MongoDB server. Options include: 'oplog' to capture changes from the oplog; 'change_streams' to capture changes via MongoDB Change Streams, update events do not contain full documents; 'change_streams_update_full' (the default) to capture changes via MongoDB Change Streams, update events contain full documents
      • getCaptureMode

        public String getCaptureMode()
      • setSnapshotDelayMs

        public void setSnapshotDelayMs​(long snapshotDelayMs)
        A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms.
      • getSnapshotDelayMs

        public long getSnapshotDelayMs()
      • setProvideTransactionMetadata

        public void setProvideTransactionMetadata​(boolean provideTransactionMetadata)
        Enables transaction metadata extraction together with event counting
      • isProvideTransactionMetadata

        public boolean isProvideTransactionMetadata()
      • setTombstonesOnDelete

        public void setTombstonesOnDelete​(boolean tombstonesOnDelete)
        Whether delete operations should be represented by a delete event and a subsquenttombstone event (true) or only by a delete event (false). Emitting the tombstone event (the default behavior) allows Kafka to completely delete all events pertaining to the given key once the source record got deleted.
      • isTombstonesOnDelete

        public boolean isTombstonesOnDelete()
      • setMongodbAuthsource

        public void setMongodbAuthsource​(String mongodbAuthsource)
        Database containing user credentials.
      • getMongodbAuthsource

        public String getMongodbAuthsource()
      • setConnectBackoffInitialDelayMs

        public void setConnectBackoffInitialDelayMs​(long connectBackoffInitialDelayMs)
        The initial delay when trying to reconnect to a primary after a connection cannot be made or when no primary is available, given in milliseconds. Defaults to 1 second (1,000 ms).
      • getConnectBackoffInitialDelayMs

        public long getConnectBackoffInitialDelayMs()
      • setCollectionExcludeList

        public void setCollectionExcludeList​(String collectionExcludeList)
        A comma-separated list of regular expressions that match the collection names for which changes are to be excluded
      • getCollectionExcludeList

        public String getCollectionExcludeList()
      • setSnapshotIncludeCollectionList

        public void setSnapshotIncludeCollectionList​(String snapshotIncludeCollectionList)
        this setting must be set to specify a list of tables/collections whose snapshot must be taken on creating or restarting the connector.
      • getSnapshotIncludeCollectionList

        public String getSnapshotIncludeCollectionList()
      • setDatabaseHistoryFileFilename

        public void setDatabaseHistoryFileFilename​(String databaseHistoryFileFilename)
        The path to the file that will be used to record the database history
      • getDatabaseHistoryFileFilename

        public String getDatabaseHistoryFileFilename()
      • setConnectMaxAttempts

        public void setConnectMaxAttempts​(int connectMaxAttempts)
        Maximum number of failed connection attempts to a replica set primary before an exception occurs and task is aborted. Defaults to 16, which with the defaults for 'connect.backoff.initial.delay.ms' and 'connect.backoff.max.delay.ms' results in just over 20 minutes of attempts before failing.
      • getConnectMaxAttempts

        public int getConnectMaxAttempts()
      • setMaxQueueSizeInBytes

        public void setMaxQueueSizeInBytes​(long maxQueueSizeInBytes)
        Maximum size of the queue in bytes for change events read from the database log but not yet recorded or forwarded. Defaults to 0. Mean the feature is not enabled
      • getMaxQueueSizeInBytes

        public long getMaxQueueSizeInBytes()
      • setTransactionTopic

        public void setTransactionTopic​(String transactionTopic)
        The name of the transaction metadata topic. The placeholder ${database.server.name} can be used for referring to the connector's logical name; defaults to ${database.server.name}.transaction.
      • getTransactionTopic

        public String getTransactionTopic()
      • setMongodbSocketTimeoutMs

        public void setMongodbSocketTimeoutMs​(int mongodbSocketTimeoutMs)
        The socket timeout, given in milliseconds. Defaults to 0 ms.
      • getMongodbSocketTimeoutMs

        public int getMongodbSocketTimeoutMs()
      • setEventProcessingFailureHandlingMode

        public void setEventProcessingFailureHandlingMode​(String eventProcessingFailureHandlingMode)
        Specify how failures during processing of events (i.e. when encountering a corrupted event) should be handled, including:'fail' (the default) an exception indicating the problematic event and its position is raised, causing the connector to be stopped; 'warn' the problematic event and its position will be logged and the event will be skipped;'ignore' the problematic event will be skipped.
      • getEventProcessingFailureHandlingMode

        public String getEventProcessingFailureHandlingMode()
      • setMongodbName

        public void setMongodbName​(String mongodbName)
        Unique name that identifies the MongoDB replica set or cluster and all recorded offsets, and that is used as a prefix for all schemas and topics. Each distinct MongoDB installation should have a separate namespace and monitored by at most one Debezium connector.
      • getMongodbName

        public String getMongodbName()
      • setSnapshotMaxThreads

        public void setSnapshotMaxThreads​(int snapshotMaxThreads)
        The maximum number of threads used to perform the snapshot. Defaults to 1.
      • getSnapshotMaxThreads

        public int getSnapshotMaxThreads()
      • setConnectBackoffMaxDelayMs

        public void setConnectBackoffMaxDelayMs​(long connectBackoffMaxDelayMs)
        The maximum delay when trying to reconnect to a primary after a connection cannot be made or when no primary is available, given in milliseconds. Defaults to 120 second (120,000 ms).
      • getConnectBackoffMaxDelayMs

        public long getConnectBackoffMaxDelayMs()
      • setSchemaNameAdjustmentMode

        public void setSchemaNameAdjustmentMode​(String schemaNameAdjustmentMode)
        Specify how schema names should be adjusted for compatibility with the message converter used by the connector, including:'avro' replaces the characters that cannot be used in the Avro type name with underscore (default)'none' does not apply any adjustment
      • getSchemaNameAdjustmentMode

        public String getSchemaNameAdjustmentMode()
      • setMongodbSslInvalidHostnameAllowed

        public void setMongodbSslInvalidHostnameAllowed​(boolean mongodbSslInvalidHostnameAllowed)
        Whether invalid host names are allowed when using SSL. If true the connection will not prevent man-in-the-middle attacks
      • isMongodbSslInvalidHostnameAllowed

        public boolean isMongodbSslInvalidHostnameAllowed()
      • setDatabaseIncludeList

        public void setDatabaseIncludeList​(String databaseIncludeList)
        A comma-separated list of regular expressions that match the database names for which changes are to be captured
      • getDatabaseIncludeList

        public String getDatabaseIncludeList()
      • createConnectorConfiguration

        protected io.debezium.config.Configuration createConnectorConfiguration()
        Specified by:
        createConnectorConfiguration in class org.apache.camel.component.debezium.configuration.EmbeddedDebeziumConfiguration
      • configureConnectorClass

        protected Class configureConnectorClass()
        Specified by:
        configureConnectorClass in class org.apache.camel.component.debezium.configuration.EmbeddedDebeziumConfiguration
      • validateConnectorConfiguration

        protected org.apache.camel.component.debezium.configuration.ConfigurationValidation validateConnectorConfiguration()
        Specified by:
        validateConnectorConfiguration in class org.apache.camel.component.debezium.configuration.EmbeddedDebeziumConfiguration
      • getConnectorDatabaseType

        public String getConnectorDatabaseType()
        Specified by:
        getConnectorDatabaseType in class org.apache.camel.component.debezium.configuration.EmbeddedDebeziumConfiguration