Read and Delete Message from Subscription (Destructive Read)
This operation is used to read and delete a message from a subscription as an atomic operation. This operation should be used when a best-effort guarantee is sufficient for an application; that is, using this operation it is possible for messages to be lost if processing fails.
| Method | Request URI | HTTP Version |
|---|---|---|
|
DELETE |
https://{serviceNamespace}.servicebus.Windows.net/{topic-path}/Subscriptions/{subscription-name}/messages/head?timeout={seconds} |
HTTP/1.1 |
URI Parameters
None.
Request Headers
The following table describes required and optional request headers.
| Request Header | Description |
|---|---|
|
Authorization |
Specifies a WRAPv0.9.7.2 token containing a SimpleWebToken acquired from ACS. Set to WRAP access_token=”{swt}”. |
Request Body
None.
Response Codes
| Code | Description |
|---|---|
|
200 |
Message successfully retrieved and deleted. |
|
204 |
No messages available within the specified timeout period. |
|
401 |
Authorization failure. |
|
410 |
Specified subscription does not exist. |
|
500 |
Internal error. |
For information about status codes, see Status and Error Codes.
Response Headers
None.
Response Body
The response body is the message body of the retrieved message.