Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1861

Node.JS change stream resume token example has a typo

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Docs
    • None

    Description

      Description

      When looking at https://docs.mongodb.com/manual/changeStreams/#resume-a-change-stream the Node.js example has the following code where the resumeAfter is the only word in the document

        newChangeStream = collection.watch({ resumeAfter });
        newChangeStream.on('change', next => {
          // process next document
        });

      While I believe it was meant to be:

        newChangeStream = collection.watch({ "resumeAfter" :  resumeToken });
        newChangeStream.on('change', next => {
          // process next document
        });

      FYI

      Scope of changes

      Impact to Other Docs

      MVP (Work and Date)

      Resources (Scope or Design Docs, Invision, etc.)

      Attachments

        Activity

          People

            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            pavel.duchovny@mongodb.com Pavel Duchovny
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: