I want to use mongoDb-kafka connectors in my kotlin-gradle project to read events from kafka topic and store is directly to a mongodb collection

31 views Asked by At

{ "name": "mongo-sink-connector", "config": { "connector.class": "org.mongodb.kafka.connect.MongoSinkConnector", "tasks.max": "1", "topics": "xyz-external", "connection.uri": "mongodb://localhost:27017", "database": "test", "collection": "sink-source" } }

This is my configuration file what code should i write in main.kt to perform this task..i need to do everything in my kotlin code.

My kafka is running on port 29092 and mongo db is running on 27017 in docker container

0

There are 0 answers