AWS SNS Producer
This operator receives a message from the input port and publishes it to an Amazon Web Services Simple Notification Service (AWS SNS) topic.
Limitations
SNS accepts only a string as the body of the message. If the input message has a non-string body, SNS encodes the input message using Base64 encoding to a string, and adds the attribute msg.IsSnsBodyEncoded to the SNS message with the value true. If the SNS message is consumed by the corresponding consumer operator, the operator decodes the body and removes the msg.IsSnsBodyEncoded attribute automatically.
Configuration Parameters
|
Parameter |
ID |
Type |
Description |
|---|---|---|---|
|
Connection |
connection |
object |
Required. AWS SNS connection consisting of the following elements:
|
|
Topic |
topic |
string |
Name of an SNS topic or Amazon Resource Name (ARN) of an SNS topic. If you provide only a name, the operator creates an ARN using the given region and account ID from the Connection parameter. The operator looks up the ARN on SNS, and reuses it if it already exists. If an ARN doesn't already exist, the operator creates the ARN. The value specified for Topic is the default topic to which received messages are published. Alternatively, if there exists a msg.TopicArn attribute in the message, the operator uses the value of this attribute as a topic name, and the message is published to this topic rather than the specified value in Topic. The msg.TopicArn attribute also exists in the message received by the consumer operator. If Topic is empty and the operator can't get the topic name from the message attributes, the operator fails regardless of the value of the Error Handling parameter. |
|
Error handling |
errorHandling |
string |
How the operator handles errors. Options include the following:
|
|
Maximum retries |
maxRetries |
integer |
Number of times the operator tries to send a request to the SNS API. |
|
Delete topic on shutdown |
deleteTopicOnShutdown |
boolean |
When set to true, specifies to delete the SNS topic if SAP Data Intelligence shuts down the graph. SNS also deletes all attached subscriptions. |
|
Proxy |
proxy |
string |
HTTP proxy for the HTTP client that issues SNS API calls. |
Input
|
Name |
ID |
Type |
Description |
|---|---|---|---|
|
Messages to publish |
messageToPublish |
message |
The stream of messages to publish. If input messages have message.error set to true, the behavior is based on the value of the Error Handling parameter. Messages must be UTF-8 encoded strings, at most 256 KB in size. Message must have a body. An empty body is replaced with "". SAP Data Intelligence converts an SNS message with an empty string as its body to a Modeler message with nil as its body. The message body must be either a string or a byte array. |
Output
|
Output |
ID |
Type |
Description |
|---|---|---|---|
|
Publishing results |
publishResult |
message |
Result of publishing an input message as a successful publication. A successful publication includes SNS-assigned message ID for the publication (under the attribute msg.MessageID) and the topic to which it was published (under the attribute msg.TopicArn). |