-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: change stream, drivers, manual
-
Labels:
-
2
Description
I can't find any documentation on how to "unwatch" a collection/database/cluster.
https://mongodb.github.io/node-mongodb-native/3.3/api/Collection.html#watch
https://mongodb.github.io/node-mongodb-native/3.3/api/Db.html#watch
https://mongodb.github.io/node-mongodb-native/3.3/api/MongoClient.html#watch
https://docs.mongodb.com/manual/changeStreams/
https://docs.mongodb.com/manual/reference/method/db.collection.watch/
https://docs.mongodb.com/manual/reference/method/db.watch/
There is however a related ticket, CSHARP-2372, which mentions a "cancellation token". How does that translate to the Node driver? Does the change stream close or end when it gets garbage collected?
A/C
Each subtask complete showing how to unwatch/cancel a change stream