Dışarıya aktar (0) Yazdır
Tümünü Genişlet
EN
Bu içerik dilinizde bulunmamaktadır ancak İngilizce sürümüne buradan bakabilirsiniz.
0 / 3 bunu faydalı olarak değerlendirdi - Bu konuyu değerlendir

Peek-Lock Message from a Queue (Non-Destructive Read)

Updated: February 5, 2014

Atomically retrieves and locks a message from a queue for processing. The message is guaranteed not to be delivered to other receivers (on the same subscription only) during the lock duration period specified in the queue description. Once the lock expires, the message will be available to other receivers. In order to complete processing of the message, the receiver should issue a delete command with the lock ID received from this operation. To abandon processing of the message and unlock it for other receivers, an Unlock Message command should be issued, or the lock duration period can expire.

This operation should be used in applications that require At-Least-Once delivery assurances. Assuming the receiver does not delete the message before processing is successful, this will ensure another receiver is able to attempt processing after the lock duration period expires.

 

Method Request URI HTTP Version

POST

https://{serviceNamespace}.servicebus.Windows.net/{queue path}/messages/head?timeout={seconds}

Note that the timeout value cannot be greater than 55 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.

The response includes an HTTP status code and a set of response headers.

Response Codes

 

Code Description

201

Message successfully locked for processing and lock is created.

204

No messages available within the specified timeout period.

400

Invalid timeout.

401

Authorization failure.

404

Subscription never existed.

410

Specified subscription does not exist.

500

Internal error.

For information about status codes, see Status and Error Codes.

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

 

Response Header Description

Location

The URI of the locked message. This URI is needed to unlock or delete the message.

BrokerProperties{LockToken}

The lock ID for the locked message.

BrokerProperties{SequenceNumber}

The sequence number of the locked message.

Response Body

The message body of the retrieved message.

Bunu faydalı buldunuz mu?
(1500 karakter kaldı)
Geri bildiriminiz için teşekkür ederiz

Topluluk İçeriği

Ekle
Show:
© 2014 Microsoft. Tüm hakları saklıdır.