PeekLock Method

Performs a peek/lock on the first available message in the message buffer.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method PeekLock()()()() Retrieves the first available message from the message buffer, and locks that message on the buffer.
Public method PeekLock(TimeSpan) Retrieves the first message from the message buffer and locks the message on the buffer for the default lock duration of two minutes.
Public method PeekLock(TimeSpan, TimeSpan) Retrieves a copy of the first message from the message buffer, while locking the original message in the buffer, using the specified timeout and lock duration.
Top

A peek/lock retrieval means that the message buffer sends a copy of the first message in the buffer to the client, but keeps the original message in the buffer as well. The original message is “locked”, and is unavailable for further retrieval, although other messages can be retrieved. The message will remain locked until the client explicitly deletes the message from the message buffer, explicitly unlocks the message, or else if the lock times out and is unlocked automatically.

For more information, see How to: Retrieve a Message from an AppFabric Service Bus Message Buffer.

Community Additions

Show: