Docs Menu

Change Stream Properties

On this page

  • Overview
  • Settings

Use the following configuration settings to specify aggregation pipelines for change streams and read preferences for change stream cursors.

For a list of source connector configuration settings organized by category, see the guide on Source Connector Configuration Properties.

Name
Description
pipeline
Type: string

Description:
An array of aggregation pipelines to run in your change stream.
Example
[{"$match": {"operationType": "insert"}}, {"$addFields": {"Kafka": "Rules!"}}]
Tip
Additional Examples
Default: []
Accepted Values: Valid aggregation pipeline stage
change.stream.full.document
Type: string

Description:
Determines what values your change stream returns on update operations.
The default setting returns the differences between the original document and the updated document.
The updateLookup setting returns the differences between the original document and updated document as well as a copy of the entire updated document at a point in time after the update.
Tip

For more information on how this change stream option works, see the MongoDB server manual guide on Lookup Full Document for Update Operations.


Default: ""
Accepted Values: "" or "default" or "updateLookup"
publish.full.document.only
Type: boolean

Description:
Whether to publish the changed document instead of the full change stream document. When set to true, the connector automatically sets the change.stream.full.document property to updateLookup to receive the updated documents.

Default: false
Accepted Values: true or false
collation
Type: string

Description:
A JSON collation document that specifies language-specific ordering rules that MongoDB applies to the documents returned by the change stream.

Default: ""
Accepted Values: A valid collation JSON document
batch.size
Type: int

Description:
The change stream cursor batch size.

Default: 0
Accepted Values: An integer
poll.await.time.ms
Type: long

Description:
The amount of time in milliseconds to wait before checking the change stream cursor for new results.

Default: 5000
Accepted Values: An integer
poll.max.batch.size
Type: int

Description:
Maximum number of documents to read in a single batch when polling a change stream cursor for new data. You can use this setting to limit the amount of data buffered internally in the connector.

Default: 1000
Accepted Values: An integer

On this page

Give Feedback
MongoDB logo
© 2021 MongoDB, Inc.

About

  • Careers
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2021 MongoDB, Inc.