IMessageReceiver.DeferAsync(String, IDictionary<String,Object>) Method

Definition

Indicates that the receiver wants to defer the processing for the message.

public System.Threading.Tasks.Task DeferAsync (string lockToken, System.Collections.Generic.IDictionary<string,object> propertiesToModify = null);
abstract member DeferAsync : string * System.Collections.Generic.IDictionary<string, obj> -> System.Threading.Tasks.Task
Public Function DeferAsync (lockToken As String, Optional propertiesToModify As IDictionary(Of String, Object) = null) As Task

Parameters

lockToken
System.String

The lock token of the Message.

propertiesToModify
System.Collections.Generic.IDictionary<System.String,System.Object>

The properties of the message to modify while deferring the message.

Returns

System.Threading.Tasks.Task

Remarks

A lock token can be found in LockToken, only when ReceiveMode is set to PeekLock. In order to receive this message again in the future, you will need to save the SequenceNumber and receive it using ReceiveDeferredMessageAsync(Int64). Deferring messages does not impact message's expiration, meaning that deferred messages can still expire. This operation can only be performed on messages that were received by this receiver.

Applies to