How can I change structure of the message that is written to kafka by mongodb kafka connector?
By default it writes message like below
{"schema":{"type":"string","optional":false},"payload":"<updated_document>"}
But I just want the payload i.e. the message I want to be written is like
{<updated_document>}
My source config is
"connector.class": "com.mongodb.kafka.connect.MongoSourceConnector",
"connection.uri": "mongodb://mongo/?replicaSet=rs0",
"database": "<db_name>",
"collection": "<collection_name>",
"publish.full.document.only": "true",
"topic.namespace.map": "{\"<db_name>.<collection_name>\": \"<kafka_topic_name>\"}"