-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.2.27
-
Component/s: MongoDB 3.2
-
Empty show more show less
We are developing a microservice which integrates with a MongoDB Server backend. We support the MongoDB Server in a standalone configuration. When the MongoDB Server becomes unavailable (e.g., when the close event on db is raised), we put the service into a paused state. When then attempt to reconnect (via MongoClient.connect()) in background to go from a paused to a running state.
We would like to support replica set configurations, as well, but note that the close event is not raised by db in this configuration. We need to be agnostic on the MongoDB Server configuration as it is provided by our customers. We are looking for a consistent way to detect when either a standalone server or an entire replica set is no longer available.