Condividi tramite


BrokeredMessage.DeadLetter Method

Definition

Overloads

DeadLetter()

Moves the message to the dead letter queue.

DeadLetter(IDictionary<String,Object>)

Moves the message to the dead letter queue.

DeadLetter(String, String)

Moves the message to the dead letter queue.

DeadLetter()

Moves the message to the dead letter queue.

public void DeadLetter ();
member this.DeadLetter : unit -> unit
Public Sub DeadLetter ()

Exceptions

Thrown when the message is in disposed state or the receiver with which the message was received is in disposed state.

Thrown when invoked on a message that has not been received from the message server or invoked on a message that has not been received in peek-lock mode.

Applies to

DeadLetter(IDictionary<String,Object>)

Moves the message to the dead letter queue.

public void DeadLetter (System.Collections.Generic.IDictionary<string,object> propertiesToModify);
member this.DeadLetter : System.Collections.Generic.IDictionary<string, obj> -> unit
Public Sub DeadLetter (propertiesToModify As IDictionary(Of String, Object))

Parameters

propertiesToModify
IDictionary<String,Object>

The key-value pair collection of properties to modify.

Applies to

DeadLetter(String, String)

Moves the message to the dead letter queue.

public void DeadLetter (string deadLetterReason, string deadLetterErrorDescription);
member this.DeadLetter : string * string -> unit
Public Sub DeadLetter (deadLetterReason As String, deadLetterErrorDescription As String)

Parameters

deadLetterReason
String

The reason for deadlettering the message.

deadLetterErrorDescription
String

The description information for deadlettering the message.

Exceptions

Thrown when the message is in disposed state or the receiver with which the message was received is in disposed state.

Thrown when invoked on a message that has not been received from the message server or invoked on a message that has not been received in peek-lock mode.

Thrown when the queue or subscription that receives the message is no longer present in the message server.

Thrown when operation times out. Timeout period is initialized through the MessagingFactorySettings. You may need to increase the value of OperationTimeout to avoid this exception if timeout value is relatively low.

Thrown if the lock on the message has expired. LockDuration is an entity-wide setting and can be initialized through LockDuration and LockDuration for Queues and Subscriptions respectively.

Thrown if the lock on the session has expired. Session lock duration is the same as message LockDuration and is an entity-wide setting. It can be initialized through LockDuration and LockDuration for Queues and Subscriptions respectively.

Applies to