File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change
1
+ .. warning ::
2
+
3
+ The `tryNext() <{+api+}/classes/ChangeStream.html#tryNext >`_ method does not
4
+ automatically update the change stream's `resumeToken.
5
+ <{+api+}/classes/ChangeStream.html#resumeToken> `_ If you require an updated
6
+ ``resumeToken ``, use the ``next() `` method.
Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ section for more information on the settings you can configure with this object.
60
60
The ``watch()`` method returns an instance of a `ChangeStream <{+api+}/classes/ChangeStream.html>`__. You can read events from
61
61
change streams by iterating over them or listening for events.
62
62
63
+ .. include:: /includes/changestream-paradigm-warning.rst
64
+
63
65
Select the tab that corresponds to the way you want to
64
66
read events from the change stream:
65
67
@@ -88,6 +90,7 @@ read events from the change stream:
88
90
- ``next()`` to request the next document in the stream
89
91
- ``close()`` to close the ChangeStream
90
92
93
+ .. include:: /includes/try-next-warning.rst
91
94
92
95
.. tab::
93
96
:tabid: Event
@@ -114,8 +117,6 @@ read events from the change stream:
114
117
115
118
changeStream.close();
116
119
117
- .. include:: /includes/changestream-paradigm-warning.rst
118
-
119
120
.. _node-usage-watch:
120
121
121
122
Examples
You can’t perform that action at this time.
0 commit comments