Get Queue Message
This activity is used to receive one or more messages from a 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, if there are messages on the queue. The number of messages returned are usually be smaller than the MaxMessages parameter (unless it is 1) and it is usually necessary to loop on the Get 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 if the queue is empty.
General
In the General tab, you can select shared resource to establish a connection to the Amazon server. The following table lists the configurations in the General tab of the GetQueueMessage activity.
Description
In the Description tab, you can provide a short description for the GetQueueMessage activity.
Input
In the Input tab, you can specify input values for the GetQueueMessage activity. The following table lists the input elements in 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
In the Output tab, you can find the output value of the GetQueueMessage activity. The following table lists the output elements in 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 | 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, refer to 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. |