File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
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 @@ -44,6 +44,8 @@ section for more information on the settings you can configure with this object.
44
44
The ``watch()`` method returns an instance of a `ChangeStream <{+api+}/classes/ChangeStream.html>`__. You can read events from
45
45
change streams by iterating over them or listening for events.
46
46
47
+ .. include:: /includes/changestream-paradigm-warning.rst
48
+
47
49
Select the tab that corresponds to the way you want to
48
50
read events from the change stream:
49
51
@@ -72,6 +74,7 @@ read events from the change stream:
72
74
- ``next()`` to request the next document in the stream
73
75
- ``close()`` to close the ChangeStream
74
76
77
+ .. include:: /includes/try-next-warning.rst
75
78
76
79
.. tab::
77
80
:tabid: Event
@@ -98,7 +101,7 @@ read events from the change stream:
98
101
99
102
changeStream.close();
100
103
101
- .. include:: /includes/changestream-paradigm-warning.rst
104
+ .. _node-usage-watch:
102
105
103
106
Examples
104
107
--------
You can’t perform that action at this time.
0 commit comments