Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ReceiveErrorHandling Property

MsmqBindingElementBase.ReceiveErrorHandling Property

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

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

[ConfigurationPropertyAttribute("receiveErrorHandling", DefaultValue = ReceiveErrorHandling.Fault)]
public ReceiveErrorHandling ReceiveErrorHandling { get; set; }

Property Value

Type: System.ServiceModel.ReceiveErrorHandling
A ReceiveErrorHandling value that specifies how poison and messages that cannot be dispatched are handled.

When this property is set to Fault, the listener is faulted and a ProtocolException (wrapping a MsmqPoisonMessageException) is traced and thrown. The message is left in the queue and must be removed in a manual way. The MsmqPoisonMessageException contains a MessageLookupId that can be used to identify and manually remove the 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 acknowledgement is sent to the client and the message is removed from the poison-message queue. This option is available only on Message Queuing (MSMQ) 4.0.

When this property is set to Move, the message is moved to the final poison-message subqueue. This option is available only on Message Queuing (also known as MSMQ) 4.0.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft