-
Type:
Improvement
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Currently when subscribing to the SDAM monitoring events, the initial topologyDescriptionChanged event is emitted before the driver provides the ability to subscribe to it.
MongoClient.connect(uri, (error, db) => {
// At this point the first event has already fired - we cannot get the initial payload.
db.topology.on('topologyDescriptionChanged', (evt) => {});
});
Would like to have some ability to get the first payload. Either via an API or by delaying the emitting of the events until they can actually be subscribed to.