From 4342fe33dcb62c8f4e20b0f0535ccc57ddb3aca8 Mon Sep 17 00:00:00 2001 From: Andrew Feierabend Date: Wed, 13 Jan 2021 15:12:31 -0500 Subject: [PATCH] DOCSP-13944 clarify _id resumeToken definition for change streams --- source/reference/change-events.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/source/reference/change-events.txt b/source/reference/change-events.txt index 0b2988983a2..f0b1c634ddd 100644 --- a/source/reference/change-events.txt +++ b/source/reference/change-events.txt @@ -60,7 +60,12 @@ following table describes each field in the change stream response document: * - ``_id`` - document - - Metadata related to the operation. + - .. _change-stream-event-id: + + A :term:`BSON` object which serves as an identifier for the + change stream event. This value is used as the ``resumeToken`` + for the ``resumeAfter`` parameter when resuming a change stream. + The ``_id`` object has the following form: .. code-block:: none @@ -68,13 +73,14 @@ following table describes each field in the change stream response document: "_data" : } - Use this document as a ``resumeToken`` for the ``resumeAfter`` - parameter when resuming a change stream. + The ``_data`` type depends on the MongoDB versions + and, in some cases, the :ref:`feature compatibility version (fCV) + ` at the time of the change stream's + opening/resumption. See :ref:`change-stream-resume-token` for the + full list of ``_data`` types. - The resume token ``_data`` type depends on the MongoDB versions - and, in some cases, the feature compatibility version (fcv) at - the time of the change stream's opening/resumption. For details, - see :ref:`change-stream-resume-token`. + See :ref:`change-stream-resume` for an example of resuming a + change stream by ``resumeToken``. * - ``operationType`` - string