Amazon AWS SQS (Simple Queue Service) Component is designed to use Amazon AWS SQS via AWS SDK.
The credentials consist of 4 fields:
https://sqs.us-east-1.amazonaws.com/1234567890/MyTestQueue
JG76FHG67VGHh78KLPOD578
ad67FGh7as5daFHhsd6/jdf75wSW/JBVH56ashjas6S
us-east-1
Here is the document explaining where and how to get the keys.
Please note: The flow must be set as real-time! Otherwise, errors may appear.
We recommend you set the lowest flow schedule (cron expression) frequency possible. E.g. once a day (0 0 * * *). And start the flow with the button ‘Run Now’ manually. Even though it does not affect the logic directly, each scheduled flow execution will create a record in the Executions list with no messages and no logs inside. All the logs and emitted messages will be appearing in the first execution.
Receive messages from the queue in a long polling manner.
The component sends long polling requests to the SQS infinitely. Once a message (a set of messages - up to MaxNumberOfMessages
messages) received it is being emitted per each message. If, say, 3 messages received, 3 individual messages would be emitted.
Right after the first call a new API request starts. And so on until the flow is shut down.
There is no Input Metadata in this trigger.
Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle of the message (not the MessageId which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue.
Please Note: if you once again delete a message that was deleted before, you will receive a response of the same structure as it would be the real delete:
{
"ResponseMetadata": {
"RequestId": "133a...00cd"
}
}
This is the way how Amazon AWS SQS works.
There is no Configuration Fields in this action.
Following is an excerpt from the AWS SQS documentation.
Retrieves one or more messages (up to 10), from the specified queue. Using the WaitTimeSeconds parameter enables long-poll support. For more information, see Amazon SQS Long Polling in the Amazon SQS Developer Guide.
Short poll is the default behavior where a weighted random set of machines is sampled on a ReceiveMessage call. Thus, only the messages on the sampled machines are returned. If the number of messages in the queue is small (fewer than 1,000), you most likely get fewer messages than you requested per ReceiveMessage call. If the number of messages in the queue is extremely small, you might not receive any messages in a particular ReceiveMessage response. If this happens, repeat the request.
There is no Input Metadata in this action.
Sending a message to a queue
After several load tests we can make several conclusions:
Send Message
action is able to generate:
2-3
messages per second 1 by 1, each up to 10KB in size10-20
messages per second using parallel processing x10.Receive Messages
trigger is able to receive:
2
messages per second, if you use delete option enabled.20-30
messages per second w/o delete option.These numbers are just for reference and can depend on many factors - like current Amazon SQS server and platform load, network stability, and so on.
To reach best performance we recommend using Parallel Processing
feature in Send Message
action - optimal size is 10.
If you use delete flag, speed decrease to only 2 messages per second, so better split flow logic - delete messages using separate action - Delete Message
Here is how to enable “Parallel Processing” option:
Summary
tabShow Advanced Settings
Parallel Processing
numberClick here to learn more about the elastic.io iPaaS