Docs Menu

MongoDB Connection Configuration Properties

On this page

  • Overview
  • Settings

Use the following configuration settings to specify how your sink connector connects and communicates with your MongoDB cluster.

For a list of sink connector configuration settings organized by category, see the guide on Sink Connector Configuration Properties.

Name
Description
connection.uri
Required

Type: string

Description:
The MongoDB connection URI string to connect to your MongoDB instance or cluster.
For more information, see the Connect to MongoDB guide
Important
Avoid Exposing Your Authentication Credentials

To avoid exposing your authentication credentials in your connection.uri setting, use a ConfigProvider and set the appropriate configuration parameters.

Default: mongodb://localhost:27017
Accepted Values: A MongoDB connection URI string
max.num.retries
Type: int

Description:
The number of retries to attempt when encountering write errors to MongoDB.

Default: 1
Accepted Values: An integer
retries.defer.timeout
Type: int

Description:
Amount of time (in milliseconds) to defer a retry attempt.

Default: 5000
Accepted Values: An integer
server.api.version
Type: string

Description:
The Versioned API version you want to use with your MongoDB server. For more information on the Versioned API and versions of the server that support it, see the Versioned API MongoDB server manual guide.

Default: ""
Accepted Values: An empty string or a valid Versioned API version.
server.api.deprecationErrors
Type: boolean

Description:
When set to true, if the connector calls a command on your MongoDB instance that's deprecated in the declared Versioned API version, it raises an exception.
You can set the API version with the server.api.version configuration option. For more information on the Versioned API, see the MongoDB manual entry on the Versioned API.

Default: false
Accepted Values: true or false
server.api.strict
Type: boolean

Description:
When set to true, if the connector calls a command on your MongoDB instance that's not covered in the declared Versioned API version, it raises an exception.
You can set the API version with the server.api.version configuration option. For more information on the Versioned API, see the MongoDB manual entry on the Versioned API.

Default: false
Accepted Values: true or false

On this page

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.