对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。
Docs 菜单

变更流属性

使用 MongoDB Kafka 源连接器时,使用以下配置设置指定变更流的聚合管道和变更流游标的读取偏好。

有关按类别排列的 Source 连接器配置设置列表,请参阅 Source 连接器配置属性指南。

名称
说明

管道

类型:string

说明:
要在变更流中运行的聚合管道数组。您必须为变更流事件文档而不是 fullDocument 字段配置此设置。

示例:

[{"$match": { "$and": [{"operationType": "insert"}, {"fullDocument.eventId": 1404 }] } }]

有关更多示例,请参阅:

默认:"[]"
接受值:有效的聚合管道阶段

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.

The whenAvailable setting returns the updated document, if available.

The required setting returns the updated document and raises an error if it is not available.

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

Default: ""
Accepted Values: "", "updateLookup", "whenAvailable", or "required"

change.stream.show.expanded.events

Type: boolean

Description:
Determines if change streams notifies for DDL events such as
createIndexes and
dropIndexes
events. To learn more, see showExpandedEvents.

This setting is required to show
updateDescription.disambiguatedPaths in update events, which
clarifies changes that involve ambiguous fields. To learn more,
see disambiguatedPaths.

Default: false
Accepted Values: true or false

change.stream.full.document.before.change

Type: string

Description:
Configures the document pre-image your change stream returns on update operations. The pre-image is not available for source records published while copying existing data, and the pre-image configuration has no effect on copying.

To learn how to configure a collection to enable pre-images, see Change Streams with Document Pre- and Post-Images in the MongoDB manual.

The default setting suppresses the document pre-image.

The whenAvailable setting returns the document pre-image if it's available, before it was replaced, updated, or deleted.

The required setting returns the document pre-image and raises an error if it is not available.

Default: ""
Accepted Values: "" or "whenAvailable" or "required"

publish.full.document.only

Type: boolean

Description:
Whether to return only the fullDocument field from the change stream event document produced by any update event. The fullDocument field contains the most current version of the updated document. To learn more about the fullDocument field, see the update Event in the Server manual.

When set to true, the connector overrides the change.stream.full.document setting and sets it to updateLookup so that the fullDocument field contains updated documents.

Default: false
Accepted Values: true or false

publish.full.document.only.tombstone.on.delete

类型:布尔值

说明:
删除文档时是否返回逻辑删除事件。逻辑删除事件包含具有 null 值的已删除文档的密钥。此设置仅在 publish.full.document.only 为 true 时应用。

默认: false
接受的值: true 或 false

change.stream.document.key.as.key

类型: 布尔值

说明:
如果存在文档密钥,是否使用文档密钥作为源记录密钥。

当设置为 true 时,连接器会将已删除文档的密钥添加到 tombstone 事件中。当设置为 false 时,连接器会使用恢复令牌作为 tombstone 事件的源密钥。

默认: true
允许的值: true 或 false

排序规则

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

类型: int

说明:
变更流游标批处理大小。

默认: 0
接受值: 整数

poll.await.time.ms

类型: long

说明:
在返回空批处理之前,服务器等待新数据更改以报告给变更流游标的最长时间(以毫秒为单位)。

默认: 5000
接受值: 整数

poll.max.batch.size

类型: int

说明:
轮询变更流游标以获取新数据时,在单个批处理中读取的最大文档数。您可以使用此设置来限制连接器内部缓冲的数据量。

默认: 1000
接受值: 整数

给本页内容打分

在此页面上