Install the MongoDB Kafka Connector
On this page
Overview
Learn how to install the MongoDB Kafka Connector. The connector is available for Confluent Platform and Apache Kafka deployments. To see installation instructions for your deployment type, navigate to one of the following sections:
Install the Connector on Confluent Platform
Click the following tabs to see instructions for how to install the connector on Confluent Platform:
Follow the installation instructions for the MongoDB Connector for Apache Kafka using the Confluent Hub Client.
Follow the directions on the Confluent page for Manually Installing Community Connectors.
Use the connector GitHub URL and uber JAR locations in the reference table when appropriate in the Confluent manual installation instructions.
Install the Connector on Apache Kafka
Locate and download the uber JAR to get all the dependencies required for the connector. Check the reference table to find the uber JAR.
Note
If you are unable to use the uber JAR or prefer to manage your own dependencies, download the JAR that contains the minimum required dependencies and resolve any runtime dependencies. You can use a plugin such as Maven dependency:tree to generate the dependency tree.
Copy the JAR and any dependencies into the Kafka plugins directory which you can specify in your plugin.path configuration setting (e.g.
plugin.path=/usr/local/share/kafka/plugins
).
Note
If you intend to run the connector as distributed worker processes, you must repeat this process for each server or virtual machine.
Download a Connector JAR File
You can download the connector source and JAR files from the following locations:
Kafka Connector GitHub repository (source code) | |
Maven Central repository (JAR files) |
You can identify the contents of the JAR files by the suffix in the file name. Consult the following table for a description of each suffix:
Suffix | Description |
all | The uber JAR that contains the connector, MongoDB dependencies, and Apache Avro |
confluent | Contains the minimum requirements for the connector and Confluent Platform |
javadoc | Contains the Javadoc documentation for the connector classes |
sources | Contains the source code that corresponds to the compiled connector classes |
For example,
mongo-kafka-connect-1.14.1-all.jar
is the uber JAR for the version 1.14.1 connector.