Skip to content

Commit

Permalink
DOCSP-31215 - startup mode (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
mongoKart authored Jul 31, 2023
1 parent 7d481c6 commit 086edd3
Showing 1 changed file with 37 additions and 17 deletions.
54 changes: 37 additions & 17 deletions source/configuration/read.txt
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,6 @@ You must specify this partitioner using the full classname:

This partitioner creates a single partition.




.. _spark-change-stream-conf:

Change Streams
Expand Down Expand Up @@ -329,6 +326,20 @@ Change Streams
see the MongoDB server manual guide
:manual:`Lookup Full Document for Update Operation </changeStreams/#lookup-full-document-for-update-operations>`.

* - ``change.stream.micro.batch.max.partition.count``
- | The maximum number of partitions the {+connector-short+} divides each
micro-batch into. Spark workers can process these partitions in parallel.
|
| This setting applies only when using micro-batch streams.
|
| **Default**: ``1``

.. warning:: Event Order

Specifying a value larger than ``1`` can alter the order in which
the {+connector-short+} processes change events. Avoid this setting
if out-of-order processing could create data inconsistencies downstream.

* - ``change.stream.publish.full.document.only``
- | Specifies whether to publish the changed document or the full
change stream document.
Expand All @@ -348,20 +359,29 @@ Change Streams
This setting overrides the ``change.stream.lookup.full.document``
setting.

* - ``change.stream.micro.batch.max.partition.count``
- | The maximum number of partitions the {+connector-short+} divides each
micro-batch into. Spark workers can process these partitions in parallel.
|
| This setting applies only when using micro-batch streams.
|
| **Default**: ``1``

.. warning:: Event Order

Specifying a value larger than ``1`` can alter the order in which
the {+connector-short+} processes change events. Avoid this setting
if out-of-order processing could create data inconsistencies downstream.

* - ``change.stream.startup.mode``
- | Specifies how the connector starts up when no offset is available.

| This setting accepts the following values:

- ``latest``: The connector begins processing
change events starting with the most recent event.
It will not process any earlier unprocessed events.
- ``timestamp``: The connector begins processing change events at a specified time.

To use the ``timestamp`` option, you must specify a time by using the
``change.stream.startup.mode.timestamp.start.at.operation.time`` setting.
This setting accepts timestamps in the following formats:

- An integer representing the number of seconds since the
:wikipedia:`Unix epoch <Unix_time>`
- A date and time in
`ISO-8601 <https://www.iso.org/iso-8601-date-and-time-format.html>`__
format with one-second precision
- An extended JSON ``BsonTimestamp``

**Default**: ``latest``

.. _configure-input-uri:

``connection.uri`` Configuration Setting
Expand Down

0 comments on commit 086edd3

Please sign in to comment.