Debezium MongoDB CDC Connector
Debezium’s MongoDB Connector can monitor a MongoDB replica set or a MongoDB sharded cluster for document changes in databases and collections, recording those changes as events in Kafka topics. The connector automatically handles the addition or removal of shards in a sharded cluster, changes in membership of each replica set, elections within each replica set, and awaiting the resolution of communications problems..
Confluent Hub CLI installation
Use the Confluent Hub client to install this connector with:
confluent-hub install debezium/debezium-connector-mongodb:1.2.2
Or download the ZIP file and extract it into one of the directories that is listed on the Connect worker's plugin.path configuration properties. This must be done on each of the installations where Connect will be run.
Once installed, you can then create a connector configuration file with the connector's settings, and deploy that to a Connect worker.