Queries the parameters of a queue.
You can call this operation to query the parameters of a queue. The operation returns the values of the parameters that were specified when the queue was created. The operation also returns the time when the queue was created, the time when the queue was last modified, and the approximate numbers of different types of messages.
Each request consists of the following parts:
- Request line
GET /queues/$queueName HTTP/1.1
- Operation-specific request headers
None. For information about common request headers, see Common parameters.
- Request Body
Each response consists of the following parts:
- HTTP Status Code
HTTP/1.1 200 OK
- Operation-specific response headers
None. For information about common response headers, see Common parameters.
- Response Body
The response body is in the XML format. The syntax of the response body is
<Queue>Queue parameter list</Queue>.
The following table lists the parameters of the queue in the response body.
Parameter Description QueueName The name of the queue. CreateTime The time when the topic was created. The value is a timestamp that follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970. LastModifyTime The time when the topic was last modified. The value is a timestamp that follows the UNIX time format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970. DelaySeconds The delay period after which a message sent to the queue can be consumed. Unit: seconds. MaximumMessageSize The maximum size of a message body that can be sent to the queue. Unit: bytes. MessageRetentionPeriod The maximum period for which a message can be retained in the queue. A message that is sent to the queue can be retained for a specified period. After the specified period ends, the message is deleted no matter whether it is consumed. Unit: seconds. PollingWaitSeconds The maximum period for which a ReceiveMessage request waits if no message is available in the queue. Unit: seconds. ActiveMessages The total number of messages that are in the Active state in the queue. The value is an approximate number. InactiveMessages The total number of the messages that are in the Inactive state in the queue. The value is an approximate number. DelayMessages The total number of the messages that are in the Delayed state in the queue. The value is an approximate number. LoggingEnabled Indicates whether the log management feature is enabled for the queue. Valid values:
- True: The lifecycle management feature is enabled.
- False: The lifecycle management feature is disabled.
GET /queues/$queueName HTTP/1.1 Host: $AccountId.mns.cn-hangzhou.aliyuncs.com Date: Wed, 08 Mar 2012 12:00:00 GMT x-mns-version: 2015-06-06 Authorization: MNS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
Sample success responses
HTTP/1.1 200 OK Content-Type=text/xml;charset=utf-8 Content-Length:145 x-mns-request-id:512B2A634403E52B1956133E x-mns-version: 2015-06-06 <? xml version="1.0" encoding="UTF-8"? > <Queue xmlns="http://mns.aliyuncs.com/doc/v1/"> <QueueName>$queueName </QueueName ><!-returns the actual queue name-> <CreateTime>1250700999</CreateTime > <LastModifyTime>1250700999</LastModifyTime> <VisibilityTimeout>60</VisibilityTimeout > <MaximumMessageSize>65536</MaximumMessageSize> <MessageRetentionPeriod>65536</MessageRetentionPeriod> <DelaySeconds>30</DelaySecond> <PollingWaitSeconds>0</PollingWaitSeconds> <InactiveMessages>0</InactiveMessages> <ActiveMessages>20</ActiveMessages> <DelayMessages>0</DelayMessages> <LoggingEnabled>True</LoggingEnabled> </Queue>
|Error code||Error message||HTTP status code|
|QueueNotExist||The queue name you provided is not exist.||404|