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 a6adb92af769702094de58ef518ea8c4d6f1f410 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Tue Sep 14 12:17:48 2021 +0200 Support Subject as header into sns fifo sink --- aws-sns-fifo-sink.kamelet.yaml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/aws-sns-fifo-sink.kamelet.yaml b/aws-sns-fifo-sink.kamelet.yaml index 6eee7a1..0c19c75 100644 --- a/aws-sns-fifo-sink.kamelet.yaml +++ b/aws-sns-fifo-sink.kamelet.yaml @@ -13,7 +13,12 @@ metadata: spec: definition: title: AWS SNS FIFO Sink - description: Send message to an AWS SNS FIFO Topic + description: |- + Send message to an AWS SNS FIFO Topic + + The Kamelet expects the following headers to be set: + + - `subject` / `ce-subject`: the subject of the message required: - topicNameOrArn - accessKey @@ -66,6 +71,18 @@ spec: from: uri: kamelet:source steps: + - choice: + when: + - simple: "${header[subject]}" + steps: + - set-header: + name: CamelAwsSnsSubject + simple: "${header[subject]}" + - simple: "${header[ce-subject]}" + steps: + - set-header: + name: CamelAwsSnsSubject + simple: "${header[ce-subject]}" - set-property: name: contentBasedDeduplication constant: "{{contentBasedDeduplication}}"