Queue Description
The queue description is an XML AtomPub document that defines the desired semantics for a queue. The queue description contains the following properties. For more information, see the QueueDescription Properties topic.
Queue Description Properties
MaxSizeInMegaBytes: Number
Specifies the maximum queue size in megabytes. Any attempt to enqueue a message that will cause the queue to exceed this value will fail. You can only set this parameter at queue creation time using the following values:Range: 1 – 1024 (valid values are 1024, 2048, 3072, 4096, 5120)
Default: 1*1024 (valid values are 1024, 2048, 3072, 4096, 5120)
SizeinBytes: Number
Reflects the actual number of bytes that messages in the queue currently occupy toward the queue’s quota.- Range: 0 –MaxSizeInMegaBytes
MessageCount: Number
Displays the number of messages currently in the queue.DefaultMessageTimeToLive: XML datetime
Depending on whether DeadLettering is enabled, a message is automatically moved to the DeadLetterQueue or deleted if it has been stored in the queue for longer than the specified time. This value is overwritten by a TTL specified on the message if and only if the message TTL is smaller than the TTL set on the queue. This value is immutable after the queue has been created:Range: 1 second – TimeSpan.MaxValue
Default: TimeSpan.MaxValue
LockDuration: XML datetime
Determines the amount of time in seconds in which a message should be locked for processing by a receiver. After this period, the message is unlocked and available for consumption by the next receiver:Range: 0 – 5 minutes. 0 means that the message is not locked
Default: 30 seconds
RequiresSession: True, False
Settable only at queue creation time. If set to true, the queue will be session-aware and only SessionReceiver will be supported. Session-aware queues are not supported through REST.- Default for durable queue: false
RequiresDuplicateDetection: True, False
Settable only at queue creation time.- Default for durable queue: false
EnableDeadLetteringOnMessageExpiration: True, False
This field controls how the Service Bus handles a message with an expired TTL. If it is enabled and a message expires, Service Bus moves the message from the queue into the queue’s dead-letter sub-queue. If disabled, message is permanently deleted from the queue. Settable only at queue creation time.- Default: false
DuplicateDetectionHistoryTimeWindow
Specifies the time span during which Service Bus detects message duplication:Range: 1 second – 7 days
Default: 10 minutes
EnableBatchedOperations
Enables or disables service-side batching behavior when performing operations for the specific queue. When enabled, Service Bus collects/batches multiple operations to the back end, in order to be more efficient with the connection. If you want lower operation latency, you can disable this feature.ForwardTo
The path to the recipient to which the message is forwarded.MaxDeliveryCount
The maximum number of times Service Bus tries to deliver a message before being dead-lettered or discarded.IsAnonymousAccessible
Gets whether anonymous access is allowed.AuthorizationRules
Gets the authorization rules for the description.Status
Gets or sets the current status of the queue (enabled or disabled). When a queue is disabled, that queue cannot send or receive messages.SupportOrdering
Gets or sets whether the queue supports ordering.
It is important to note that the schema validation of the description during queue creation is sensitive to the order of its child elements. For example, the following is not accepted as a valid queue description.
<QueueDescription xmlns=\"https://schemas.microsoft.com/netservices/2010/10/servicebus/connect\">
<MaxSizeInMegaBytes>10000</MaxSizeInMegaBytes>
<DefaultMessageTimeToLive>PT5M</DefaultMessageTimeToLive>
<LockDuration>PT2M</LockDuration>
<RequiresGroupedReceives>False</RequiresGroupedReceives>
<SupportsDuplicateDetection>False</SupportsDuplicateDetection>
</QueueDescription>
However, if the elements appear as below, it is accepted as a valid queue description:
<QueueDescription xmlns=\"https://schemas.microsoft.com/netservices/2010/10/servicebus/connect\">
<LockDuration>PT2M</LockDuration>
<MaxSizeInMegaBytes>1024</MaxSizeInMegaBytes>
<SupportsDuplicateDetection>false</SupportsDuplicateDetection>
<RequiresGroupedReceives>false</RequiresGroupedReceives>
<DefaultMessageTimeToLive>PT5M</DefaultMessageTimeToLive>
</QueueDescription>
Here are some things you can do with this API
List all queues under a given path:
http://<serviceBusAddress>/$Resources/Queues?$filter=startswith(path, ‘/my/test’)
List all queues updated in the last 5 minutes:
http://<serviceBusAddress>/$Resources/Queues?$filter=lastModifiedTime Gt 2011-08-09T21:44:36.2481552Z
List all queues having at least one message:
http://<serviceBusAddress>/$Resources/Queues?$filter=MessageCount Gt 0
See Also
Queues
Example: Creating a Queue
Create Queue
Delete Queue
Get Queue
List Queues