Overview
您可以设置配置属性来指定MongoDB Kafka Sink connector如何将数据写入MongoDB 。 以下部分介绍了可以设置的配置属性,可自定义此行为。
WriteModel
将 writemodel.strategy 配置属性设置为 ,以指定接收器connector在接收接收器记录时如何写入数据。
You can set the value of writemodel.strategy to any of the fully qualified class names of the write model strategies described in the Strategies section of this page. You can specify a strategy by setting the following configuration:
writemodel.strategy=<a write model strategy>
删除写入模型
将 delete.writemodel.strategy 配置属性设置为 ,以指定 Sink connector在收到 tombstone 事件时如何写入数据。 逻辑删除事件是指包含键但不包含值的记录,这表示记录已删除。
You can set the value of delete.writemodel.strategy to any of the fully qualified class names of the write model strategies described in the Strategies section of this page. You can specify a strategy by setting the following configuration:
delete.writemodel.strategy=<a write model strategy>
有关按类别组织的接收器连接Connector配置设置列表,请参阅接收器连接器配置属性指南。
Strategies
名称 | 说明 | |
|---|---|---|
DefaultWriteModelStrategy | 描述: | |
InsertOneDefaultStrategy | 描述: | |
ReplaceOneDefaultStrategy | 描述: | |
替换一个业务键策略 | 描述: 要查看如何使用此策略的示例,请参阅我们的 写模型策略 指南。 | |
DeleteOneDefaultStrategy | 描述: | |
删除一个业务键策略 | 描述: 要查看如何使用此策略的示例,请参阅我们的 写模型策略 指南。 | |
删除单个墓碑业务键策略 | 描述: | |
UpdateOneDefaultStrategy | 描述: | |
更新一个时间戳策略 | 描述: 要查看如何使用此策略的示例,请参阅我们的 写模型策略 指南。 | |
UpdateOneBusinessKeyTimestampStrategy | 描述: |