Presently MongoDB driver has this Deprecation Warning:
Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version
when the options are set to:
const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: false });
And if I still continue with the same I get some topology error when I get the network loss, and stack-up of requests
I know the cure is to keep the useUnifiedTopology
true
, but I need my Server to reconnect to DB in case of network loss. Else I have to reconnect to DB for every 1or2 operations