Get Queue Message

This activity is used to receive one or more messages from an SQS Queue. The GetQueueMessage activity can be configured to use long polling by setting the WaitTime to be greater than zero (0). However, the activity returns almost immediately, when there are messages on the queue. The number of messages returned are usually smaller than the MaxMessages parameter (unless it is 1) and it is usually necessary to loop on the Get Queue Message to retrieve all the messages in the queue. This is normal within the context of SQS messaging. The only time that the activity is blocked for the full WaitTime period, is when the queue is empty.

General

On the General tab, select shared resource to establish a connection to the Amazon server. The following table lists the configurations on the General tab of the GetQueueMessage activity.

Field Module Property? Description
Name No Name to be displayed as a label for the activity in the process.
SQS Client Yes Select SQS Client configuration either from an existing resource or create a new resource, by using the Choose/Create Default Resource icon .
ManualDelete No If enabled, use confirm activity to delete the messages. By default, the check box is not selected.
Caution:

Always use confirm activity to delete messages within visibility timeout. If the messages are deleted after visibility timeout, there could be an exception or duplicate messages are received.

Description

On the Description tab, provide a short description for the GetQueueMessage activity.

Input

On the Input tab, you can specify input values for the GetQueueMessage activity. The following table lists the input elements on the Input tab of the GetQueueMessage activity.

Input Item Data Type Description
QueueName String Required. The name of the queue from which messages are to be received.
MaxMessages Int Optional. Indicates the maximum number of messages to be received in one operation. The default value is 1 and the maximum value is 10.
WaitTime Int Optional. The duration (in seconds) for which the call waits for a message to arrive before returning. If no message arrives in the allowed time, an SQSException is thrown indicating that a timeout condition has occurred. If Amazon server is down, plug-in keeps trying to reconnect to the server till WaitTime.
PollingInterval Int Optional. The duration after which plug-in tries to reconnect to the server before timeout.

Output

On the Output tab, find the output value of the GetQueueMessage activity. The following table lists the output elements on the Output tab of the GetQueueMessage activity.

Output Item Data Type Description
SqsMessage Complex Encodes 1 to 10 messages.
SenderId String Returns the IAM Role or user ID of the sender.
MessageId String The message ID assigned to the message when it was originally sent.
SentTimeStamp String The timestamp when the message was sent.
Body String The message body.
MessageGroupId String It specifies that a message belongs to a specific message group.
MessageDeduplicationId String It is used for avoiding a duplication of the sent messages.
SequenceNumber String The large, non-consecutive number that Amazon SQS assigns to each message.
MessageAttrs Complex Encodes the message attributes to be sent as part of the message. Each attribute is composed of a Name, Type, and Value.
Name String The name of the attribute.
Type String The type of the attribute.
Value String A string representation of the attribute value.

Fault

The Fault tab lists exceptions that are generated by this activity.

Fault Data Type Description
SQSException N/A Any exception generated by the activity after execution. It has the following fields: ErrorCode and ErrorMessage.
ErrorCode String The plug-in error code for the exception. For more information, see Error Codes topic.
ErrorMessage String The plug-in error message for the exception. It contains the error message from the AWS SQS API call that failed.