Docs Menu

Connect your Kafka Connector to MongoDB

On this page

  • Overview
  • Identify Your MongoDB Java Driver Version
  • Configure Your Connection URI

This guide shows you how to configure your MongoDB Kafka Source or Sink Connector to connect to and authenticate with a MongoDB cluster.

The MongoDB Kafka Connector uses the MongoDB Java Driver to connect to your MongoDB cluster. The MongoDB Java Driver enables you to use any of the authentication mechanisms available in that version of the driver using a Connection URI.

To read more about the terms above, see the following MongoDB Server Manual entries:

Each MongoDB Kafka Connector version uses a specific version of the MongoDB Java Driver. Check the version of the Java Driver in the connector's dependency list to ensure that it supports the authentication mechanism.

If you are using the Uber JAR, you can find the dependency file from the same place that you downloaded that distribution. For links to the distributions, see the Installation Reference Table.

To check whether a specific MongoDB Java Driver version supports your authentication mechanism, see the table below or visit the reference documentation for the driver release version.

MongoDB Java Driver Version
Kerberos (GSSAPI)

To configure your MongoDB Kafka Source or Sink Connector, specify your connection URI in the connection.uri setting. Refer to the configuration guides for more detail:

For more information on how to build your connection URI, navigate to the Authentication section in the MongoDB Java Driver reference documentation that corresponds to your connector version.

If you need to configure SSL/TLS, see our Configure SSL/TLS Guide.

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.


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