diff --git a/source/includes/changestream-paradigm-warning.rst b/source/includes/changestream-paradigm-warning.rst new file mode 100644 index 000000000..a4880a1ac --- /dev/null +++ b/source/includes/changestream-paradigm-warning.rst @@ -0,0 +1,8 @@ +.. warning:: + + Using a ``ChangeStream`` in ``EventEmitter`` and ``Iterator`` mode + concurrently is not supported by the driver and causes an error. This + is to prevent undefined behavior, where the driver cannot guarantee + which consumer receives documents first. + + diff --git a/source/usage-examples/changeStream.txt b/source/usage-examples/changeStream.txt index 5662a27ee..59f12a498 100644 --- a/source/usage-examples/changeStream.txt +++ b/source/usage-examples/changeStream.txt @@ -29,10 +29,7 @@ The ``watch()`` method returns an instance of a :node-api-4.0:`ChangeStream