我正在使用 MongoDB Kafka 连接器,我能够成功创建和更新记录,但无法删除连接器配置中的记录我正在使用这个配置
{
"name": "mongo-sink",
"config": {
"connector.class": "com.mongodb.kafka.connect.MongoSinkConnector",
"tasks.max": "1",
"topics": "test",
"connection.uri": "mongodb://mongo1:27018,mongo2:27019,mongo3:27020",
"database": "accounting",
"collection": "test",
"key.converter": "org.apache.kafka.connect.storage.StringConverter",
"value.converter": "io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url": "http://schema-registry:8081",
"value.converter.schemas.enable": "false",
"document.id.strategy": "com.mongodb.kafka.connect.sink.processor.id.strategy.PartialKeyStrategy",
"document.id.strategy.partial.key.projection.list":"productId",
"document.id.strategy.partial.key.projection.type":"ALLOWLIST",
"writemodel.strategy":"com.mongodb.kafka.connect.sink.writemodel.strategy.ReplaceOneBusinessKeyStrategy",
"delete.on.null.values": "true",
"transforms":"WrapKey",
"transforms.WrapKey.type":"org.apache.kafka.connect.transforms.HoistField$Key",
"transforms.WrapKey.field":"_id"
}
}
如果我发送空记录文档更新为空而不删除任何想法,则无法删除记录?