Navigation

Migrate from Kafka Connect

Follow the steps in this guide to migrate your Kafka deployments from Kafka Connect to the official MongoDB Kafka connector.

Update Configuration Settings

  • Replace any property values that refer to at.grahsl.kafka.connect.mongodb with com.mongodb.kafka.connect.
  • Replace MongoDbSinkConnector with MongoSinkConnector as the value of the connector.class key.
  • Remove the “mongodb.” prefix from all configuration property key names.
  • Remove the document.id.strategies key if it exists. If the value of this field contained references to any custom strategies, move them to the document.id.strategy field and read the Update Custom Classes section for additional required changes to your classes.
  • Replace any keys that were used to specify per-topic and collection overrides that contain the mongodb.collection prefix with the equivalent key in Topic-Specific Configuration Settings.

Update Custom Classes

If you added any classes or custom logic to your Kafka Connect connector, migrate them to the new MongoDB Kafka connector jar file and make the following changes to them:

  • Update imports that refer to at.grahsl.kafka.connect.mongodb to com.mongodb.kafka.connect.
  • Replace references to the MongoDbSinkConnector class with MongoSinkConnector.
  • Update custom sink strategy classes to implement the com.mongodb.kafka.connect.sink.processor.id.strategy.IdStrategy interface.
  • Update references to the MongoDbSinkConnectorConfig class which has been split into the sink.MongoSinkConfig and sink.MongoSinkTopicConfig classes.

Update PostProcessor Subclasses

  • Update any concrete methods that override methods in the Kafka Connect PostProcessor class to match the new method signatures of the MongoDB Kafka Connector PostProcessor class.