- Notifications
You must be signed in to change notification settings - Fork0
srigumm/Mongo-To-Kafka-CDC
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
KAFKA CDC Source Connector - using "Debezium CDC Connector " to import mongodb data into kafka topics
A Kafka CDC connector to source data from MongoDB Cluster, available as part of confluent connector pluginshttps://www.confluent.io/connector/debezium-mongodb-cdc-connector/
**For more details about the plugin owners,visithttps://debezium.io/docs/connectors/mongodb/
- "mongodb.hosts": "rs0/mongo1:27017", - "mongodb.name": "rawmaterial", - "database.whitelist": "inventory" (**your database here **) Note: you can use our docker-compose file to spinup a new mango cluster along with connectors.Path: src/kafka-mongo-import-export/scripts/mongoclustersetup.shNote: cdcsetup.sh has a curl POST call that issues a "create new connector" instruction to the existing connector process(running on 8083)- cd <<root>> i.e cd eCupcakesFactoryOnContainers- Run => "docker-compose up"Note: our docker-compose file would standup a new mongodb replicaset, starts the kafka connector process(on 8083) and runs a source connector for importing mongodata.Create some collections in the configured mongodb(i.e inventory as per the step2) cluster(on primary node): use inventory db.ingredients.insert({"Id":132,"Flavour":"Cookies","Quantity":11}) verify kafka if a new topic topic got created: When this connector runs successfully, it creates new topics in kafa with the below name format: <<logicalname>>.<<dbname>>.<<collectioname>> ex: as per the configuration in step2, new topic name that gets created is - rawmaterial.inventory.<<collectioname>>docker-compose downdocker-compose rmAbout
Using "Debezium" Kafka CDC connector plugin to source data from MongoDB Cluster into KAFKA topics.
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published