, free & fully virtual. June 9th - 10th. Register Now, free & fully virtual. June 9th - 10th. Register Now

Mongo-Kafka source connector change stream return string?


I’m using MongoSourceConnector, to connect a Kafka I’m getting the message on the topic without a problem, but when I wanna try to do a schema-registry from this I’m getting this:


On the schema registry:
curl -X GET http://schema-registry:8081/subjects/mongo.test.pageviews-value/versions/1/schema

Looks if the change stream returns a JSON string, any way to change this to return a JSON?

Driver connector:

    curl -X POST http://localhost:8083/connectors -H "Content-Type: application/json" -d '{
	 "name": "sr-connector-test",
	 "config": {
		"topic.prefix": "sr_topic",
		"": "true"

Connector Status:


Topic returned:
//Always return the msg with double quotes " "
"{"_id": {"_data": {"$binary": "gl5O1i8AARmVwXaNDYq7CWduUosquBA==", "$type": "00"}}, "operationType": "update", "ns": {"db": "name", "coll": "tx"}, "documentKey": {"_id": {"$oid": "5e4de1f01b8406"}}, "updateDescription": {"updatedFields": {"updated": {"$date": 15824943562}}, "removedFields": []}}"

Hi @Ivan_Dario_Trebilcoc,

That’s correct, until the KAFKA-40 work has been completed the source connector will only output extended json strings.

Please “watch” the KAFKA-40 ticket for updates on producing schema’d data from the Source connector.

All the best,



Thanks @Ross_Lawley for you answer, was very helpful.

1 Like