MsmqBindingBase.ReceiveErrorHandling Property

 

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

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

public ReceiveErrorHandling ReceiveErrorHandling { get; set; }

Property Value

Type: System.ServiceModel.ReceiveErrorHandling

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

A message in the queue becomes poisoned if repeated attempts to deliver the message failed. This poison message is eventually handled based on the setting of this property. When this property is set to Fault, the listener is faulted and a MsmqPoisonMessageException is traced and thrown. The poison message is left in the queue and must be removed before more messages can be accessed from the queue. The MsmqPoisonMessageException contains a MessageLookupId that can be used to identify and manually remove the poison message from the queue.

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

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

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

.NET Framework
Available since 3.0
Return to top
Show: