This is an automated email from the ASF dual-hosted git repository. nferraro pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 3c0e250a18217603ae83fb12dd7454b57460e0f5 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Fri Mar 26 13:55:46 2021 +0100 Added AWS SNS FIFO Sink Kamelet --- aws-sns-fifo-sink.kamelet.yaml | 103 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/aws-sns-fifo-sink.kamelet.yaml b/aws-sns-fifo-sink.kamelet.yaml new file mode 100644 index 0000000..a06ce62 --- /dev/null +++ b/aws-sns-fifo-sink.kamelet.yaml @@ -0,0 +1,103 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: aws-sns-fifo-sink + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: sink + camel.apache.org/requires.runtime: "camel-quarkus" +spec: + definition: + title: AWS SNS FIFO Sink + description: Send message to an AWS SQS FIFO Queue + required: + - topicNameOrArn + - accessKey + - secretKey + - region + properties: + topicNameOrArn: + title: Topic Name + description: The SNS Topic name or ARN + 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 + type: string + example: eu-west-1 + contentBasedDeduplication: + title: Content-Based Deduplication + description: Use content-based deduplication (should be enabled in the SQS FIFO queue first) + type: boolean + default: false + autoCreateTopic: + title: Autocreate topic + description: Setting the autocreation of the SNS topic. + type: boolean + x-descriptors: + - 'urn:alm:descriptor:com.tectonic.ui:checkbox' + default: false + dependencies: + - camel-quarkus:aws2-sns + flow: + from: + uri: kamelet:source + steps: + - set-property: + name: contentBasedDeduplication + constant: "{{contentBasedDeduplication}}" + - choice: + when: + - simple: "${header[group]}" + steps: + - set-property: + name: CamelAwsSnsMessageGroupId + simple: "${header[group]}" + - simple: "${header[ce-group]}" + steps: + - set-property: + name: CamelAwsSnsMessageGroupId + simple: "${header[ce-group]}" + otherwise: + steps: + - set-property: + name: CamelAwsSnsMessageGroupId + simple: "${exchangeId}" + - choice: + when: + - simple: "${exchangeProperty.contentBasedDeduplication} == 'true'" + steps: + - to: + uri: "aws2-sns:{{topicNameOrArn}}" + parameters: + autoCreateTopic: "{{autoCreateTopic}}" + accessKey: "{{accessKey}}" + secretKey: "{{secretKey}}" + region: "{{region}}" + messageGroupIdStrategy: "usePropertyValue" + messageDeduplicationIdStrategy: "useContentBasedDeduplication" + otherwise: + steps: + - to: + uri: "aws2-sns:{{topicNameOrArn}}" + parameters: + autoCreateTopic: "{{autoCreateTopic}}" + accessKey: "{{accessKey}}" + secretKey: "{{secretKey}}" + region: "{{region}}" + messageGroupIdStrategy: "usePropertyValue" + messageDeduplicationIdStrategy: "useExchangeId"