oscerd commented on issue #736: URL: https://github.com/apache/camel-kamelets/issues/736#issuecomment-1021442679
Hello and thanks for the interest in camel-kamelets and Apache Camel in general. In pure Kamelet is really hard to add custom logic like bean, but you can always write your own kamelet without troubles. For example you could something like this: https://github.com/apache/camel-kamelets/blob/main/kamelets/extract-field-action.kamelet.yaml#L106 This is a way of calling a bean inside the Kamelet body, but I do think you're thinking about calling something like from kamelet-source steps kamelet-bean to kamelet-sink and this is not possible currently and I think in the future too. The aim of Kamelets is abstracting the Apache Camel technical details by hiding them into logical unit, like a pre-baked endpoint, like a Kamelet is. You could always create a yaml route using the camel-kamelet components, like for example: ``` - route: from: uri: "kamelet:aws-s3-source" parameters: accesKey: "peppe" secretKey: "peppe" region: "eu-west-1" bucketNameOrArn: "camel-kafka-connector" useDefaultCredentialsProvider: "true" steps: - bean: "org.apache.camel.kamelets.utils.transform.ExtractField" - to: uri: "kamelet:log-sink" parameters: showHeaders: "true" ``` In yaml you'll have all the related definition from plain Camel https://github.com/apache/camel/blob/main/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json#L1650 https://github.com/apache/camel/blob/main/dsl/camel-yaml-dsl/camel-yaml-dsl/src/generated/resources/camel-yaml-dsl.json#L446 In case you need to do something complex, my suggestion is using camel-kamelet component as the example above, mixed with the Yaml construct available. HTH a bit. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org