Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MsmqBindingElementBase::ReceiveErrorHandling Property

 

Gets or sets an enumeration value that specifies how poison and other messages that cannot be dispatched are handled.

Namespace:   System.ServiceModel.Channels
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public:
property ReceiveErrorHandling ReceiveErrorHandling {
	ReceiveErrorHandling get();
	void set(ReceiveErrorHandling value);
}

Property Value

Type: System.ServiceModel::ReceiveErrorHandling

A ReceiveErrorHandling value that specifies how poison and other messages that cannot be dispatched are handled.

Exception Condition
ArgumentOutOfRangeException

The value is not within the range of values defined in ReceiveErrorHandling.

When this property is set to Fault, the channel listener is faulted and a ProtocolException (wrapping a MsmqPoisonMessageException) is traced and thrown. The message is left in the queue and must 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 message is dropped.

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

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

.NET Framework
Available since 3.0
Return to top
Show:
© 2017 Microsoft