I am using changeStreams to listen for changes of some collections, so i can replicate these changes to another database.
I save the changeStream _id as a resumeToken, and each time a changeStream comes in, i update the resume token.
You can have the connection in a try-catch block and try to access the changeStream and if that throws an error, in the catch block you can connect to the changeStream without resume token.