Open a change stream on one collection.
Section: Change streams
Watch a collection
javascript
javascript
const stream = db.orders.watch()Explanation
Change streams let applications react to new writes in near real time.
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