Error using checkpoint with mongo spark connector 10.xx

During restart spark streaming job mongo db source is failing with following error. I am using azure cosmos db version 4.0

Caused by: com.mongodb.MongoCommandException: Command failed with error 9 (FailedToParse): ‘Unrecognized field: startAfter’ on server xxxxxx.mongo.cosmos.azure.com:10255. The full response is {“ok”: 0.0, “errmsg”: “Unrecognized field: startAfter”, “code”: 9, “codeName”: “FailedToParse”}

The MongoDB Spark Connector is not designed or tested against CosmosDB.

1 Like