Provide the Ability to get the first topologyDescriptionChanged event.

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 2.2.27
    • 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.

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            Durran Jordan
            None
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: