有什么方法可以指定Kafka连接器对蒙戈应该采取哪些行动。实际上,我不希望kafka在mongo文档被删除时做任何事情(应该考虑更新和插入新文档)。谢谢您
dffbzjpn1#
你可以写一个smt(https://cwiki.apache.org/confluence/display/kafka/kip-66%3a+single+message+transforms+for+kafka+connect)可以过滤掉不需要的操作。一个例子是丢弃一个 delete 记录摘自smt-https://github.com/debezium/debezium-examples/blob/master/outbox/event-routing-smt/src/main/java/io/debezium/examples/outbox/routingsmt/eventrouter.java#l44
delete
1条答案
按热度按时间dffbzjpn1#
你可以写一个smt(https://cwiki.apache.org/confluence/display/kafka/kip-66%3a+single+message+transforms+for+kafka+connect)可以过滤掉不需要的操作。一个例子是丢弃一个
delete
记录摘自smt-https://github.com/debezium/debezium-examples/blob/master/outbox/event-routing-smt/src/main/java/io/debezium/examples/outbox/routingsmt/eventrouter.java#l44