Udostępnij za pośrednictwem


MessageReceiver.DeadLetterAsync Method

Definition

Overloads

DeadLetterAsync(String, IDictionary<String,Object>)

Moves a message to the deadletter sub-queue.

DeadLetterAsync(String, String, String)

Moves a message to the deadletter sub-queue.

DeadLetterAsync(String, IDictionary<String,Object>)

Source:
MessageReceiver.cs

Moves a message to the deadletter sub-queue.

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

Parameters

lockToken
String

The lock token of the corresponding message to deadletter.

propertiesToModify
IDictionary<String,Object>

The properties of the message to modify while moving to sub-queue.

Returns

Implements

Remarks

A lock token can be found in LockToken, only when ReceiveMode is set to PeekLock. In order to receive a message from the deadletter queue, you will need a new IMessageReceiver, with the corresponding path. You can use FormatDeadLetterPath(String) to help with this. This operation can only be performed on messages that were received by this receiver.

Applies to

DeadLetterAsync(String, String, String)

Source:
MessageReceiver.cs

Moves a message to the deadletter sub-queue.

public System.Threading.Tasks.Task DeadLetterAsync (string lockToken, string deadLetterReason, string deadLetterErrorDescription = default);
abstract member DeadLetterAsync : string * string * string -> System.Threading.Tasks.Task
override this.DeadLetterAsync : string * string * string -> System.Threading.Tasks.Task
Public Function DeadLetterAsync (lockToken As String, deadLetterReason As String, Optional deadLetterErrorDescription As String = Nothing) As Task

Parameters

lockToken
String

The lock token of the corresponding message to deadletter.

deadLetterReason
String

The reason for deadlettering the message.

deadLetterErrorDescription
String

The error description for deadlettering the message.

Returns

Implements

Remarks

A lock token can be found in LockToken, only when ReceiveMode is set to PeekLock. In order to receive a message from the deadletter queue, you will need a new IMessageReceiver, with the corresponding path. You can use FormatDeadLetterPath(String) to help with this. This operation can only be performed on messages that were received by this receiver.

Applies to