This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 2f5c4cf4a0dc5b8b9eb7ad57050f9af0a7b6b7eb Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Apr 21 14:17:34 2021 +0200 Added AWS Kinesis Sink Kamelet --- aws-kinesis-sink.kamelet.yaml | 92 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/aws-kinesis-sink.kamelet.yaml b/aws-kinesis-sink.kamelet.yaml new file mode 100644 index 0000000..50ac834 --- /dev/null +++ b/aws-kinesis-sink.kamelet.yaml @@ -0,0 +1,92 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: aws-kinesis-sink + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMzA4LjIzNDAxIj48dGl0bGU+YXdzLWtpbmVzaXM8L3RpdGxlPjxwYXRoIGQ9Ik0wLDE3Mi4wODdsMTI3Ljc1NCw1OC44MSwxMjcuNzUyLTU4LjgxLTEyNy43NTItNS4yOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjZmNiZjkyIi8+PHBhdGggZD0iTTEyOC4xNDcsMCwuMDU5LDYzLjg4MXY5MC4xMzZIMTUzLjY0OFYxMi43NTFaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMD [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: sink +spec: + definition: + title: "AWS Kinesis Sink" + description: |- + Send data to AWS Kinesis. + + The Kamelet expects the following header: + + - `partition` / `ce-partition`: to set the Kinesis partition key + + If the header won't be set the exchange ID will be used. + + The Kamelet is also able to recognize the following header: + + - `sequence-number` / `ce-sequence-number`: to set the Sequence number + + This header is optional. + required: + - stream + - accessKey + - secretKey + - region + properties: + stream: + title: Stream Name + description: The Kinesis stream that you want to access (needs to be created in advance) + type: string + accessKey: + title: Access Key + description: The access key obtained from AWS + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + secretKey: + title: Secret Key + description: The secret key obtained from AWS + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + region: + title: AWS Region + description: The AWS region to connect to (capitalized name) + type: string + example: eu-west-1 + flow: + from: + uri: kamelet:source + steps: + - choice: + when: + - simple: "${header[partition]}" + steps: + - set-header: + name: CamelAwsKinesisPartitionKey + simple: "${header[partition]}" + - simple: "${header[ce-partition]}" + steps: + - set-header: + name: CamelAwsKinesisPartitionKey + simple: "${header[ce-partition]}" + otherwise: + steps: + - set-property: + name: CamelAwsKinesisPartitionKey + simple: "${exchangeId}" + - choice: + when: + - simple: "${header[sequence-number]}" + steps: + - set-header: + name: CamelAwsKinesisSequenceNumber + simple: "${header[sequence-number]}" + - simple: "${header[ce-sequence-number]}" + steps: + - set-header: + name: CamelAwsKinesisSequenceNumber + simple: "${header[ce-sequence-number]}" + - to: + uri: "aws2-kinesis:{{stream}}" + parameters: + secretKey: "{{secretKey}}" + accessKey: "{{accessKey}}" + region: "{{region}}"