Consume the stream in mongosh.
Section: Change streams
Read the next change event
javascript
javascript
stream.next()Explanation
Useful for testing and interactive exploration.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Change streams