The subscription description is an XML AtomPub document that defines the desired semantics for a subscription.
Subscription Description Properties
The subscription description contains the following properties. For more information, see the SubscriptionDescription Properties topic.
LockDuration: XML datetime
The default lock duration is applied to subscriptions that do not define a lock duration:
Range: 0 – 5 minutes. 0 means that the message is not locked.
Default: 30 seconds
RequiresSession: True, False
You can only set this property at subscription creation time. If set to true, the subscription will be session-aware and only SessionReceiver will be supported. Session-aware subscriptions are not supported through REST.
- Default: false
Determines how long a message lives in the subscription. Based on whether dead-lettering is enabled, a message whose Time To Live (TTL) has expired is either moved to the subscription’s associated DeadLetterQueue, or permanently deleted. If the topic specifies a smaller TTL than the subscription, the topic TTL is applied.
Range: 1 second – TimeSpan.MaxValue
DeadLetteringOnMessageExpiration: True, False
This field controls how 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 subscription’s dead-letter sub-queue. If disabled, message is permanently deleted from the subscription’s main queue. Settable only at subscription creation time.
- Default: false
DeadLetteringOnFilterEvaluationExceptions: True, False
Determines how Service Bus handles a message that causes an exception during a subscription’s filter evaluation. If the value is set to true, the message that caused the exception is moved to the subscription’s dead-letter queue. Otherwise, it is discarded. By default, this parameter is set to true, enabling you to investigate the cause of the exception. It can occur from a malformed message or some incorrect assumptions being made in the filter about the form of the message. Settable only at subscription creation time.
- Default: true
Enables or disables service-side batching behavior when performing operations for the specific queue. When enabled, Service Bus will collect/batch multiple operations to the backend to be more connection efficient. If you want lower operation latency, then you can disable this feature.
The path to the recipient to which the message is forwarded.
The maximum number of times Service Bus tries to deliver a message before that message is dead lettered or discarded.
Reports the number of messages in the queue as reported by the monitoring system.
Gets whether anonymous access is allowed.
Gets the authorization rules for the description.
Gets or sets the current status of the subscription (enabled or disabled). When a subscription is disabled, that subscription cannot send or receive messages.
Gets or sets whether the subscription supports ordering.
The schema validation of the description during subscription creation is sensitive to the order of its child elements. For more information, see Queue Description.
Here are some things you can do with this API
List all subscriptions under a given path:
List all subscriptions updated in the last 5 minutes:
http://<serviceBusAddress>/$Resources/Subscriptions?$filter=lastModifiedTime Gt 2011-08-09T21:44:36.2481552Z
List all subscriptions having at least one message:
http://<serviceBusAddress>/$Resources/Subscriptions?$filter=MessageCount Gt 0