We are trying to break the mongo DB document into chunks in order to fit into Kafka message with the help of $unwind operation through MongoSourceConnector(pipeline aggregation).
org.apache.kafka.connect.errors.ConnectException: com.mongodb.MongoCommandException: Command failed with error 20 (IllegalOperation): ‘$unwind is not permitted in a $changeStream pipeline’ on server :27017. The full response is {“operationTime”: {“$timestamp”: {“t”: 1614932863, “i”: 4}}, “ok”: 0.0, “errmsg”: “$unwind is not permitted in a $changeStream pipeline”, “code”: 20, “codeName”: “IllegalOperation”, “$clusterTime”: {“clusterTime”: {“$timestamp”: {“t”: 1614932863, “i”: 4}}, “signature”: {“hash”: {“$binary”: {“base64”: “x5sWtboaMhg5aSSMWLYNswP3zKE=”, “subType”: “00”}}, “keyId”: 6880913173017264129}}}
at com.mongodb.kafka.connect.source.MongoSourceTask.setCachedResultAndResumeToken(MongoSourceTask.java:508)
Kindly suggest if this is a supported feature through MongoSourceConnector or do we have any workaround for above use case.