Modifies the configurations of a queue.

Request

A request consists of the following parts:

  • Request line

    PUT /$queueName? metaoverride=true HTTP/1.1

  • URI parameter

    To modify the configurations of a message queue, set metaoverride to true in the request.

  • Operation-specific request headers

    None. For information about common request parameters, see Common parameters.

  • Request Body

    The request body is in the XML format. It contains the parameters of the queue. These parameters are optional.

Parameter Description Value
DelaySeconds The interval between the time when a message arrives at the queue and the time when the message becomes consumable. Unit: seconds. Valid values: 0 to 604800 (7 days). Data type: integer. Default value: 0.
MaximumMessageSize The maximum size of a message body. Unit: bytes. Valid values: 1024 (1 KB) to 65536 (64 KB). Data type: integer. Default value: 65536 (64 KB).
MessageRetentionPeriod The maximum retention period of a message in the queue. After the period that is specified by this parameter expires, the message is deleted from the queue, regardless of whether the message has been consumed. Unit: seconds. Valid values: 60 (1 minute) to 604800 (7 days). Data type: integer. Default value: 259200 (3 days).
VisibilityTimeout The length of time for which a message remains inactive after it is consumed from the queue. Unit: seconds. Valid values: integers from 1 to 43200 (12 hours). Default value: 30.
PollingWaitSeconds The maximum length of time for which a ReceiveMessage request waits for a message to arrive if no message exists in the queue. Unit: seconds. Valid values: 0 to 30. Data type: integer. Default value: 0.

Response

A response consists of a status line, HTTP headers, and a response body.

  • HTTP Status Code

    HTTP/1.1 204 No Content

  • Operation-specific response headers

    None. For information about common response parameters, see Common parameters.

  • Response Body

    None.

Special Error

Error code Error message HTTP status code
InvalidArgument The value of Element should between Low and High seconds/bytes. 400
QueueNotExist The queue name you provided is not exist. 404
  • Sample requests
        PUT /$queueName? metaoverride=true HTTP/1.1
        Host: $AccountId.mqs-cn-hangzhou.aliyuncs.com
        Date: Wed, 08 Mar 2012 12:00:00 GMT
        x-mqs-version: 2014-07-08
        Authorization: MQS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAMPLE=
    
        <? xml version="1.0" encoding="UTF-8" ? >
        <Queue xmlns="http://mqs.aliyuncs.com/doc/v1/">
        <VisibilityTimeout >60</VisibilityTimeout>
        <MaximumMessageSize>1024</MaximumMessageSize>
        <MessageRetentionPeriod>120</MessageRetentionPeriod>
        <DelaySeconds>30</DelaySeconds>
        </Queue>           
  • Sample success responses
        HTTP/1.1 204 No Content
        x-mqs-request-id:512B2A634403E52B1956133E 
        x-mqs-version:2015-06-06