Creates a queue. A queue is an MSMQ. In ApsaraMQ for RabbitMQ, you send messages to a specified exchange, and then the exchange performs routing to attach the messages to a 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 instance ID of the ApsaraMQ for RabbitMQ (MSMQ) 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.
|
DemoQueue |
| AutoDeleteState |
boolean |
No |
Specifies whether to automatically delete the queue. Valid values:
|
false |
| ExclusiveState |
boolean |
No |
Specifies whether the exchange is exclusive. Valid values:
|
false |
| MessageTTL |
integer |
No |
The time-to-live (TTL) of messages in the queue.
|
1000 |
| AutoExpireState |
integer |
No |
The automatic expiration time of the queue. If the queue is not accessed within the specified time, it is automatically deleted. Unit: milliseconds. Note
To use the feature corresponding to this parameter, you must activate it first. To activate the feature, submit a ticket. |
10000 |
| MaxLength |
integer |
No |
This parameter is not supported in the current version. The maximum number of messages in the queue. If the number of messages exceeds this value, the earliest messages in the queue are deleted. |
1000 |
| DeadLetterExchange |
string |
No |
The dead-letter exchange. This type of exchange is used to accept messages that consumers deny. If a consumer chooses to deny a message without requesting to send it again, ApsaraMQ for RabbitMQ (MSMQ) performs routing of the message to the specified dead-letter exchange. The exchange then performs routing to attach the message to a queue for row store. |
DLExchange |
| DeadLetterRoutingKey |
string |
No |
The dead-letter routing key. The routing key can contain only letters, digits, hyphens (-), underscores (_), periods (.), number signs (#), forward slashes (/), and at signs (@). The routing key must be 1 to 255 characters in length. |
test.dl |
| MaximumPriority |
integer |
No |
The priority of the queue. Recommended values: 1 to 10. Note
This parameter is used for message priorities and is supported only by exclusive instances. To use this feature, you must activate it first. To activate 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.