Export (0) Print
Expand All

MsmqElementBase.ReceiveErrorHandling Property

Gets or sets an enumeration value that specifies how poison and nondispatchable messages 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 nondispatchable messages are handled.

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.

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft