Edit

Share via


MsmqElementBase.ReceiveErrorHandling Property

Definition

Gets or sets an enumeration value that specifies how poison and nondispatchable messages are handled.

public:
 property System::ServiceModel::ReceiveErrorHandling ReceiveErrorHandling { System::ServiceModel::ReceiveErrorHandling get(); void set(System::ServiceModel::ReceiveErrorHandling value); };
[System.Configuration.ConfigurationProperty("receiveErrorHandling", DefaultValue=System.ServiceModel.ReceiveErrorHandling.Fault)]
public System.ServiceModel.ReceiveErrorHandling ReceiveErrorHandling { get; set; }
[<System.Configuration.ConfigurationProperty("receiveErrorHandling", DefaultValue=System.ServiceModel.ReceiveErrorHandling.Fault)>]
member this.ReceiveErrorHandling : System.ServiceModel.ReceiveErrorHandling with get, set
Public Property ReceiveErrorHandling As ReceiveErrorHandling

Property Value

A ReceiveErrorHandling value that specifies how poison and nondispatchable messages are handled.

Attributes

Remarks

When this property is set to Fault, the channel listener is faulted and a ProtocolException (wrapping a MsmqPoisonMessageException) is traced and thrown. The offending message is left in the queue and needs to be removed by some manual method. The MsmqPoisonMessageException contains a MessageLookupId that can be used to identify and manually remove the offending message from the poison-message queue.

When this property is set to Drop, the offending message is simply dropped.

When this property is set to Reject, a negative acknowledgment is sent to the client and the offending message is removed from the poison-message queue. This option is available only on Message Queuing (also known as MSMQ) 4.0.

When set to Move, the offending message is moved to the final poison subqueue. This option is available only on Message Queuing 4.0.

Applies to