Docs Menu

Docs HomeMongoDB Kafka Connector

How to Contribute

We are happy to accept contributions to help improve the MongoDB Kafka Connector. We guide community contributions to ensure they meet the standards of the codebase. Please ensure that your pull request meets the following criteria:

  • Includes documentation comments describing your feature

  • Includes unit tests that cover the functionality of your feature

  • Passes the Gradle check task, which includes the following tasks:

    1. test task

    2. integrationTest task

    3. spotlessCheck task

To get started, check out the source code and create a branch by running the following commands in your shell:

git clone https://github.com/mongodb/mongo-kafka.git
cd mongo-kafka
git checkout -b <your branch name>

Once you push your changes to your feature branch, make sure it passes the Gradle checks. You can run the checks with the following command:

./gradlew clean check --continue -Dorg.mongodb.test.uri=<your local mongodb replica set connection uri>

Important

Integration Tests

You must have a local MongoDB replica set running to perform Gradle integration tests. To learn how to set up a MongoDB replica set, see Deploy a Replica Set in the MongoDB manual.

Note

Skipped Tests

You can skip tests in the integrationTest task related to the following areas unless your code specifically modifies MongoDB Kafka Connector behavior related to these areas:

  • Specific versions of MongoDB

  • Authentication

You can run the authentication tests by enabling authentication in your local MongoDB replica set and specifying your credentials in your connection URI. To learn how to enable authentication in a replica set, see Deploy Replica Set With Keyfile Authentication in the MongoDB manual.

You can run tests related to a specific MongoDB version by deploying a local replica set with that version of MongoDB.

To learn more about the MongoDB Kafka Connector source code, see the GitHub repository.

To learn more about Gradle, see the official Gradle website.

←  Invalid Resume TokenIssues & Help →