编写自定义的Kafka Connect单条消息转换 [英] Write a custom Kafka connect single message transform
问题描述
我已经配置了一个kafka连接Mongodb接收器,我想通过实现一些自定义逻辑来转换消息.
I have configured a kafka connect Mongodb sink and I want to transform the message by implementing some custom logic.
Kafka连接是否仅限于内置SMT(或),是否可以编写自定义SMT.如果没有,我怎么能做到这一点?通过溪流?
Is Kafka connect limited to in-built SMTs (or) is it possible to write a custom SMT. If not how can I achieve this? through streams?
推荐答案
Kafka连接是否仅限于内置SMT
Is Kafka connect limited to in-built SMTs
不,不是.您可以创建自己的并将其添加到插件路径
No, it is not. You can create your own and add them to your plugin path
转换被编译为JAR,并通过Connect worker属性文件中指定的plugin.path可用于Kafka Connect.安装后,可以在连接器属性中配置转换.
Transformations are compiled as JARs and are made available to Kafka Connect via the plugin.path specified in the Connect worker’s properties file. Once installed, the transforms can be configured in the connector properties.
https://www.confluent.io/blog/kafka-connect-single-message-transformation-tutorial-with-examples
示例回购 https://github.com/confluentinc/kafka-connect-insert-uuid
这篇关于编写自定义的Kafka Connect单条消息转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!