I am trying to handle the case when a database connection is lost. When my server starts, it connects to mongo client (using nodejs driver 5.7) and then starts watching the database for changes.
However, when the connection is lost,
- I would like to be notified - What is the appropriate event to listen to against that client?
- When do I rewatch the change stream again if the client connects automatically?