Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS SNS Subject Header #506

Merged
merged 3 commits into from
Sep 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 16 additions & 0 deletions aws-sns-sink.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
title: AWS SNS Sink
description: |-
Send message to an AWS SNS Topic

The Kamelet expects the following headers to be set:

- `subject` / `ce-subject`: the subject of the message
required:
- topicNameOrArn
- accessKey
Expand Down Expand Up @@ -59,6 +63,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]}"
- to:
uri: "aws2-sns:{{topicNameOrArn}}"
parameters:
Expand Down
4 changes: 4 additions & 0 deletions docs/modules/ROOT/pages/aws-sns-sink.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

Send message to an AWS SNS Topic

The Kamelet expects the following headers to be set:

- `subject` / `ce-subject`: the subject of the message

== Configuration Options

The following table summarizes the configuration options available for the `aws-sns-sink` Kamelet:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
title: AWS SNS Sink
description: |-
Send message to an AWS SNS Topic

The Kamelet expects the following headers to be set:

- `subject` / `ce-subject`: the subject of the message
required:
- topicNameOrArn
- accessKey
Expand Down Expand Up @@ -59,6 +63,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]}"
- to:
uri: "aws2-sns:{{topicNameOrArn}}"
parameters:
Expand Down