A queue is a buffer that stores messages. In ApsaraMQ for RabbitMQ, messages are sent to a specified exchange and then routed to a bound queue.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
amqp:CreateQueue |
create |
*Queue
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the ApsaraMQ for RabbitMQ instance to which the queue belongs. |
amqp-cn-v0h1kb9nu*** |
| VirtualHost |
string |
Yes |
The name of the vhost to which the queue belongs. The name can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The name must be 1 to 255 characters in length. |
test |
| QueueName |
string |
Yes |
The name of the queue to create.
|
DemoQueue |
| AutoDeleteState |
boolean |
No |
Specifies whether to automatically delete the queue. Valid values:
|
false |
| ExclusiveState |
boolean |
No |
Specifies whether the queue is an exclusive queue. Valid values:
|
false |
| MessageTTL |
integer |
No |
The time to live (TTL) of a message in the queue.
|
1000 |
| AutoExpireState |
integer |
No |
The auto-expiration time for the queue. The queue is automatically deleted if it is not accessed within the specified time period. Unit: milliseconds. Note
This feature must be enabled before you can use this parameter. To enable the feature, submit a ticket. |
10000 |
| MaxLength |
integer |
No |
This parameter is not supported in the current version. The maximum number of messages that can be stored in the queue. If this limit is exceeded, the earliest messages in the queue are deleted. |
1000 |
| DeadLetterExchange |
string |
No |
The dead-letter exchange. This type of exchange is used to receive rejected messages. If a consumer rejects a message and the message is not requeued, ApsaraMQ for RabbitMQ routes the message to the specified dead-letter exchange. The dead-letter exchange then routes the message to a bound queue for storage. |
DLExchange |
| DeadLetterRoutingKey |
string |
No |
The dead-letter routing key. The key can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The key must be 1 to 255 characters in length. |
test.dl |
| MaximumPriority |
integer |
No |
The priority of the queue. The recommended value is an integer from 1 to 10. Note
This parameter is used for message priority. It is supported only by dedicated instances and can be used only after the message priority feature is enabled. To enable the feature, submit a ticket. |
10 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
59B52E2C-0B8E-44EC-A314-D0314A50*** |
Examples
Success response
JSON format
{
"RequestId": "59B52E2C-0B8E-44EC-A314-D0314A50***"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.