Subscribe Topic
In this article
Overview
You can use this Snap to subscribe to a topic on Amazon SNS. To receive messages published to a topic, you must subscribe an endpoint (for example, HTTP/HTTPS) to the topic. When you subscribe an endpoint to a topic, the endpoint receives messages published to the associated topic.
Prerequisites
For an Amazon SNS topic to be able to send messages to a queue, you should set a policy on the queue that allows the Amazon SNS topic to perform the
SQS: SendMessage
action before subscribing a queue to a topic. See https://docs.aws.amazon.com/sns/latest/dg/subscribe-sqs-queue-to-sns-topic.html for further information.Create an endpoint and topic and configure before you Subscribe Topic.
Support for Ultra Pipelines
Works in Ultra Pipelines.Â
Limitations
None.
Known Issues
None.
Snap Input and Output
Input/Output | Type of View | Number of Views | Examples of Upstream and Downstream Snaps | Description |
---|---|---|---|---|
Input | Document |
|
| The topic Arn, attributes, protocol and endpoint details of the topic. |
Output | Document |
|
| The endpoint details that is subscribed to the topic. |
Error | Error handling is to have a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that might arise while running the Pipeline by choosing one of the options from the When errors occur section under the Views tab. The options available are:
See Error View in Pipeline in examples to understand the Snap error view settings and error output. For more information on the error view and handling error output in a Pipeline, see Error handling in Pipelines. |
Snap Settings
Asterisk (*): Indicates a mandatory field.
Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.
Expression icon (): Indicates whether the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.
Add icon (): Indicates that you can add fields in the field set.
Remove icon (): Indicates that you can remove fields from the field set.
Â
Field Name | Field Type | Description | |
---|---|---|---|
Label*  Default Value: N/A | String | The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.  | |
Region  Default value: None | String | Specify the AWS region where the application is implemented. This is a suggestible field and suggestions will be populated based on the Account settings. If the region field is empty, then the Snap evaluates the region in the following sequence: It is a best practice to provide the value for Region field.  | |
Topic Arn* Â Default Value: N/A | String | Specify the Amazon Resource Name of the topic. This is a suggestible field and suggestions will be populated based on the Account settings. Â | |
Protocol  Default Value: http | Dropdown list | Choose the Internet protocol to connect to Amazon server. Options available include:
| |
Endpoint | String | Enter the endpoint value. such as email address or the ARN of an Amazon SQS queue. | |
Attributes | Select to update the topic attributes. | ||
Attribute Name  Default Value: N/A | String | Enter the name of the attribute in the topic. This is a suggestible field and suggestions will be populated based on the Account settings.  | |
Attribute Value  Default Value: N/A | Integer | Enter the value of the attribute in the topic.  | |
Always Return Subscription ARN
| Checkbox | Select this checkbox if you want to return the subscription ARN even if it is not yet confirmed. Otherwise, the pending subscription would be returned for unconfirmed subscription. | |
Snap Execution  Default Value: Execute only | Select one of the three modes in which the Snap executes. Available options are:
|
Troubleshooting
Error | Reason | Resolution |
---|---|---|
An error occurred while updating a topic with the given topic name in AWS SNS. | Â Valid information might be missing. | Please check the input data, formats and try again. |
Missing Topic ARN | Â Topic ARN should not be blank. | The topic ARN must be provided. |
Examples
In this pipeline, Mapper Snap is used to give the details of the endpoint and topic to be subscribed, and then the Subscribe topic Snap is used to Subscribe the given endpoint to the topic.
The Mapper Snap is configured with the endpoint and topic details in Input Schema.
Snap Settings | Output View |
---|---|
 |  |
Once the topic details and endpoint are given, the Subscribe topic Snap is used to Subscribe an endpoint to the topic. As a result, the endpoint is subscribed or the Snap throws an error that the topic cannot be subscribed to.
Snap Settings | Output View |
---|---|
 |
Snap Pack History
See Also
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439233/Glossary
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1438341/Getting+Started
https://docs-snaplogic.atlassian.net/wiki/spaces/SD/pages/1439233/Glossary
Have feedback? Email documentation@snaplogic.com | Ask a question in the SnapLogic Community
© 2017-2024 SnapLogic, Inc.