A queue is the destination where messages are stored. Queues are sorted into standard queues and delayed queues. If you do not specify the DelaySeconds parameter when you send messages to a standard queue, the messages can be immediately consumed. If you do not specify the DelaySeconds parameter when you send messages to a delayed queue, the messages cannot be consumed until the specified delay period ends.
QueueURL
Syntax:
http://$AccountId.mns. <Region>.aliyuncs.com/queues/$QueueName
.mns. <Region>.aliyuncs.com
: the domain name of the queue. Region specifies the region where SMQ is deployed. You can specify a region based on your business requirements.AccountId
: the account ID of the queue owner.QueueName
: the name of the queue. In the same region, each queue name within an Alibaba Cloud account must be unique.
Parameters
DelaySeconds
The period for which messages are delayed. Unit: seconds.
Valid values: 0 to 604800 seconds (7 days).
If you set this parameter to a value that is greater than 0, all messages that are sent to the queue are delayed and cannot be consumed until the specified period ends.
If you specify the DelaySeconds parameter when you send messages to a queue, the system uses the delay period that is specified in the request instead of the delay period that is specified for the queue.
MaximumMessageSize
The maximum size of a message body. Unit: bytes.
Valid values: 1024 to 65536 bytes (64 KB).
If the size of the message body exceeds the limit, the message fails to be published to the topic.
MessageRetentionPeriod
The maximum period for which a message can be retained in the queue. Unit: seconds.
Valid values: 60 to 604800 seconds (7 days).
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.
VisibilityTimeout
The period for which a message remains the Inactive state after it is received. Unit: seconds.
Valid values: 1 to 43200 seconds (12 hours).
After a message is received, the message remains in the Inactive state within a specified period. During this period, the message cannot be received by other consumers, but you can delete the message or modify the value of the VisibilityTimeout parameter. After the specified period ends, the message can be received again.
PollingWaitSeconds
The maximum waiting period when you call the ReceiveMessage or BatchReceiveMessage operation. Unit: seconds.
Valid values: 0 to 30 seconds.
If no message is available in the queue when you call the ReceiveMessage or BatchReceiveMessage operation, SMQ holds the request within a specified period. If a message is sent to the queue during this period, the message is immediately received. If no message is sent to the queue during the specified period, SMQ returns the MessageNotExist error message.
If you specify the waitseconds parameter when you receive messages from a queue, the system uses the waiting period that is specified in the request instead of the waiting period that is specified for the queue.
LoggingEnabled
Specifies whether to enable the log management feature.
Valid values: True and False.
If you set the LoggingEnabled parameter to True, SMQ pushes logs of the queue to a specified Object Storage Service (OSS) bucket. For more information about log management, see Log management.
CreateTime
The time when the queue was created. The value is a timestamp that follows the UNIX format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
LastModifyTime
The time when the queue was last modified. The value is a timestamp that follows the UNIX format. It is the number of seconds that have elapsed since 00:00:00 Thursday, January 1, 1970.
ActiveMessages
The total number of messages that are in the Active state in the queue. The value is approximate.
InactiveMessages
The total number of messages that are in the Inactive state in the queue. The value is approximate.
DelayMessages
The total number of messages that are in the Delayed state in the queue. The value is approximate.