You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2021/05/04 11:18:45 UTC
[camel-kamelets] 04/04: Added Kafka Not Secured sink Kamelet
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch kafka-sink-not-auth
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit a7a29c56aef68a158dd5e3bc469be8794f2deb0c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Tue May 4 13:18:09 2021 +0200
Added Kafka Not Secured sink Kamelet
---
.../kamelets/kafka-not-secured-sink.kamelet.yaml | 67 ++++++++++++++++++++++
1 file changed, 67 insertions(+)
diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml
new file mode 100644
index 0000000..a0872ee
--- /dev/null
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/kafka-not-secured-sink.kamelet.yaml
@@ -0,0 +1,67 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: kafka-not-secured-sink
+ annotations:
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOS4wLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCA1MDAgNTAwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MD [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "Kafka Not Secured Sink"
+ description: |-
+ Send data to Kafka topics.
+
+ The Kamelet is able to understand the following headers to be set:
+
+ - `key` / `ce-key`: as message key
+
+ - `partition-key` / `paritition-key`: as message partition key
+
+ Both the headers are optional.
+ required:
+ - topic
+ - brokers
+ type: object
+ properties:
+ topic:
+ title: Topic Names
+ description: Comma separated list of Kafka topic names
+ type: string
+ brokers:
+ title: Brokers
+ description: Comma separated list of Kafka Broker URLs
+ type: string
+ flow:
+ from:
+ uri: "kamelet:source"
+ steps:
+ - choice:
+ when:
+ - simple: "${header[key]}"
+ steps:
+ - set-header:
+ name: kafka.KEY
+ simple: "${header[key]}"
+ - simple: "${header[ce-key]}"
+ steps:
+ - set-header:
+ name: kafka.KEY
+ simple: "${header[ce-key]}"
+ - choice:
+ when:
+ - simple: "${header[partition-key]}"
+ steps:
+ - set-header:
+ name: kafka.PARTITION_KEY
+ simple: "${header[partition-key]}"
+ - simple: "${header[ce-partition-key]}"
+ steps:
+ - set-header:
+ name: kafka.PARTITION_KEY
+ simple: "${header[ce-partition-key]}"
+ - to:
+ uri: "kafka:{{topic}}"
+ parameters:
+ brokers: "{{brokers}}"