| apiVersion: camel.apache.org/v1alpha1 |
| kind: Kamelet |
| metadata: |
| name: aws-kinesis-sink |
| annotations: |
| camel.apache.org/kamelet.support.level: "Preview" |
| camel.apache.org/catalog.version: "0.5.0" |
| camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTYgMzA4LjIzNDAxIj48dGl0bGU+YXdzLWtpbmVzaXM8L3RpdGxlPjxwYXRoIGQ9Ik0wLDE3Mi4wODdsMTI3Ljc1NCw1OC44MSwxMjcuNzUyLTU4LjgxLTEyNy43NTItNS4yOTNaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjZmNiZjkyIi8+PHBhdGggZD0iTTEyOC4xNDcsMCwuMDU5LDYzLjg4MXY5MC4xMzZIMTUzLjY0OFYxMi43NTFaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjOWQ1MDI1Ii8+PHBhdGggZD0iTS4wNTksMjE3LjU1OWwxMjguMTYyLDkwLjY3NUwyNTYsMjE3LjU1OSwxMjcuOTQ1LDE5OC45MjZaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjZmNiZjkyIi8+PHBhdGggZD0iTTEyOC4xNDYsMTU0LjAxN2g2Ny41NzdWNTcuODM2TDE3NS45OSw0OS45NDMsMTI4LjE0Niw2My44OThaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjOWQ1MDI1Ii8+PHBhdGggZD0iTTE3NS45OSwxNTQuMDE3aDUyLjIzM1Y5MS42MzJsLTE0Ljk0LTQuNDgxLTM3LjI5Myw2LjMzWiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMC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jY5NSw2My44NDRWMjYyLjQ0OEwuMDU4LDIxNy41NThaIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIDAuMDAwMDUpIiBmaWxsPSIjOWQ1MDI1Ii8+PHBhdGggZD0iTTAsMTk5LjA1MWwxMjcuNzU0LDMxLjg0NVYxODQuODYyTDAsMTcyLjA4NloiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgMC4wMDAwNSkiIGZpbGw9IiM5ZDUwMjUiLz48L3N2Zz4=" |
| camel.apache.org/provider: "Apache Software Foundation" |
| camel.apache.org/kamelet.group: "AWS Kinesis" |
| 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-sequencenumber`: to set the Sequence number |
| |
| This header is optional. |
| required: |
| - stream |
| - accessKey |
| - secretKey |
| - region |
| type: object |
| 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 |
| format: password |
| x-descriptors: |
| - urn:alm:descriptor:com.tectonic.ui:password |
| - urn:camel:group:credentials |
| secretKey: |
| title: Secret Key |
| description: The secret key obtained from AWS |
| type: string |
| format: password |
| x-descriptors: |
| - urn:alm:descriptor:com.tectonic.ui:password |
| - urn:camel:group:credentials |
| region: |
| title: AWS Region |
| description: The AWS region to connect to |
| type: string |
| example: eu-west-1 |
| dependencies: |
| - "camel:aws2-kinesis" |
| - "camel:kamelet" |
| 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-header: |
| name: CamelAwsKinesisPartitionKey |
| simple: "${exchangeId}" |
| - choice: |
| when: |
| - simple: "${header[sequence-number]}" |
| steps: |
| - set-header: |
| name: CamelAwsKinesisSequenceNumber |
| simple: "${header[sequence-number]}" |
| - simple: "${header[ce-sequencenumber]}" |
| steps: |
| - set-header: |
| name: CamelAwsKinesisSequenceNumber |
| simple: "${header[ce-sequencenumber]}" |
| - to: |
| uri: "aws2-kinesis:{{stream}}" |
| parameters: |
| secretKey: "{{secretKey}}" |
| accessKey: "{{accessKey}}" |
| region: "{{region}}" |