Migrate from Kafka Connect MongoDB¶
The following sections list the changes you must make to your Kafka Connect sink connector configuration settings and custom classes to transition to the MongoDB Kafka connector.
Update Configuration Settings¶
Make the following changes to the configuration settings of your Kafka Connect deployment before using them with your MongoDB Kafka connector deployment:
- Replace values that include the package
at.grahsl.kafka.connect.mongodbwith the package
connector.classsetting with the MongoDB Kafka sink connector class.
- Remove the
mongodb.prefix from your Kafka Connect property names. For example, change
- Remove the
document.id.strategiessetting if it exists. If the value of this setting reference custom strategies, move them to the
document.id.strategysetting. Read the Update Custom Classes section to discover what changes you must make to your custom classes.
- Replace any property names you use to specify per-topic or collection
overrides that contain the
mongodb.collectionprefix with the equivalent key in sink connector Kafka topic configuration topic properties.
Update Custom Classes¶
If you use any custom classes in your Kafka Connect sink connector deployment, make the following changes to them before adding them to your MongoDB Kafka connector deployment:
- Replace imports that include
- Replace references to the
MongoDbSinkConnectorclass with the
- Update custom sink connector strategy classes to implement the
Update references to the
MongoDbSinkConnectorConfigclass. In the MongoDB Kafka connector, the logic from that class is split into the following classes:
Update Post Processor Subclasses¶
If you have classes that subclass a post processor in your Kafka Connect
connector deployment, update methods that override ones in the Kafka Connect
PostProcessor class to match the method signatures of the MongoDB Kafka
connector PostProcessor class.