WARN No topic set. Could not publish the message

Recently, I resolved a similar issue. I would like to share the solution for those who might be facing the same problem.

Actually, $project does not only target fullDocument as we might think. It projects from the entire schema structure generated by the Source Connector.

You can resolve the error by using the following structure.

'[{"$project": { "_id": 1, "operationType": 1, "ns": 1, "documentKey": 1, "clusterTime": 1, "to": 1, "updateDescription": 1, "txnNumber": 1, "lsid": 1, "fullDocument._id": 1, "fullDocument.fieldA": 1, "fullDocument.fieldB": 1} } ]'
1 Like