Retrieving messages off a queue
Reading a message off the queue may be requested using one of two modes. PeekLock
, which is the default mode, reads the message of the queue and places a lock on the read message. This makes the message invisible to other consumers of the queue. The message will reappear on the queue if the consumer does not issue a Complete
command within the specified VisibilityTimeout
period. The message can also reappear if the consumer calls the Abandon
method. This type of processing is ideal for when guaranteed processing of a message is mandatory.
The following process flow describes reading a message from the queue using the PeekLock
method. Note the two scenarios when a message is placed on the dead-letter queue. First one is when the message is not read within the specified TTL period, and the second scenario is when the de-queuing count equals zero.
The second option is the ReceiveAndDelete
mode. This is when once the message is read, it will immediately be deleted...