SQS queues have attributes associated with them that can be queried and updated using API operations, and queues may have both editable and noneditable attributes. Editable attributes are configurable settings you can alter by adjusting the attribute. Noneditable attributes include system-generated information about a queue, such as the number of messages it contains.
2007-05-01 version of
the SQS Query API, two queue attributes are available:
The default visibility timeout for the queue; this value is configurable. It may be set when the queue is created and updated anytime afterwards.
The SQS system’s best estimate of the number of messages in the queue, including both visible and invisible messages; this value is generated by the system and can only be retrieved, not edited.
This value can only be approximate due to the distributed nature of SQS.
The GetQueueAttributes operation detailed in Table 8-10 retrieves a queue’s attribute settings.
Table 8-10. GetQueueAttributes request parameters
|Attribute||The name of the queue attribute to retrieve, or
Here is an XML document returned by the operation. The document includes an AttributeValue element for each attribute retrieved. The AttributeValue element contains ...