问题
I have configured a kafka connect Mongodb sink and I want to transform the message by implementing some custom logic.
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?
回答1:
Is Kafka connect limited to in-built SMTs
No, it is not. You can create your own and add them to your plugin path
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
Example repo https://github.com/confluentinc/kafka-connect-insert-uuid
来源:https://stackoverflow.com/questions/57604283/write-a-custom-kafka-connect-single-message-transform