ALIYUN::AMQP::Queue is used to create a queue.
Syntax
{
"Type": "ALIYUN::AMQP::Queue",
"Properties": {
"DeadLetterExchange": String,
"MaximumPriority": Number,
"InstanceId": String,
"ExclusiveState": Boolean,
"DeadLetterRoutingKey": String,
"VirtualHost": String,
"MaxLength": Number,
"AutoDeleteState": Boolean,
"QueueName": String,
"MessageTTL": Number,
"AutoExpireState": Number
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
DeadLetterExchange | String | No | No | The dead-letter exchange. | A dead-letter exchange is used to receive rejected messages.
If a consumer rejects a message that cannot be retried, Message Queue for RabbitMQ routes the message to the specified dead-letter exchange. Then, the dead-letter exchange routes the message to the queue that is bound to the dead-letter exchange for storage. |
MaximumPriority | Number | No | No | Queue priorities are not supported. | None. |
InstanceId | String | Yes | No | The ID of the instance. | None. |
ExclusiveState | Boolean | No | No | Specifies whether the exchange is an exclusive exchange. | Valid values:
|
DeadLetterRoutingKey | String | No | No | The dead-letter routing key. | The key name can contain only letters, digits, hyphens (-), underscores (_), periods
(.), number signs (#), forward slashes (/), and at signs (@).
The key name must be 1 to 255 characters in length. |
VirtualHost | String | Yes | No | The name of the vhost. | The vhost name can contain only letters, digits, hyphens (-), underscores (_), periods
(.), number signs (#), forward slashes (/), and at signs (@).
The vhost name must be 1 to 255 characters in length. |
MaxLength | Number | No | No | The maximum number of messages in the queue. | This property is unavailable for Message Queue for RabbitMQ.
If the maximum number of messages in the queue is exceeded, the earliest messages that are stored in the queue are deleted. |
AutoDeleteState | Boolean | No | No | Specifies whether to automatically delete the queue. | Valid values:
|
QueueName | String | Yes | No | The name of the queue. | When you specify the name, take note of the following items:
|
MessageTTL | Number | No | No | The message time-to-live (TTL) of the queue. Unit: milliseconds. | When you specify the message TTL, take note of the following items:
|
AutoExpireState | Number | No | No | The period of time after which the queue is automatically deleted. | If the queue is not accessed within the specified period of time, the queue is automatically
deleted.
Note You can use the feature that corresponds to this property after you enable the feature.
If you want to enable the feature, submit a ticket.
|
Return values
Fn::GetAtt
QueueName: the name of the queue.
Examples
-
JSON
format{ "ROSTemplateFormatVersion": "2015-09-01", "Parameters": { "InstanceId": { "Type": "String", "Description": "InstanceId" }, "VirtualHost": { "Type": "String", "Description": "The name of the virtual host." }, "QueueName": { "Type": "String", "Description": "The name of the queue.", "MaxLength": 255 } }, "Resources": { "Queue": { "Type": "ALIYUN::AMQP::Queue", "Properties": { "InstanceId": { "Ref": "InstanceId" }, "VirtualHost": { "Ref": "VirtualHost" }, "QueueName": { "Ref": "QueueName" } } } }, "Outputs": { "QueueName": { "Description": "The name of the queue.", "Value": { "Fn::GetAtt": [ "Queue", "QueueName" ] } } } }