MsmqBindingElementBase.ReceiveErrorHandling 屬性

定義

取得或設定列舉值,這個值會指定如何處理有害和其他不可分派的訊息。

public:
 property System::ServiceModel::ReceiveErrorHandling ReceiveErrorHandling { System::ServiceModel::ReceiveErrorHandling get(); void set(System::ServiceModel::ReceiveErrorHandling value); };
public System.ServiceModel.ReceiveErrorHandling ReceiveErrorHandling { get; set; }
member this.ReceiveErrorHandling : System.ServiceModel.ReceiveErrorHandling with get, set
Public Property ReceiveErrorHandling As ReceiveErrorHandling

屬性值

ReceiveErrorHandling 值,指定如何處理有害和其他不可分派的訊息。

例外狀況

這個值不在 ReceiveErrorHandling 定義的值範圍內。

備註

當這個屬性設定為 Fault 時,通道接聽程式會發生錯誤,並且會追蹤和擲回 ProtocolException (內含一個 MsmqPoisonMessageException)。 訊息會留在佇列中,並且必須由某種手動方法來移除。 MsmqPoisonMessageException 包含 MessageLookupId,後者可用於從有害訊息佇列中識別並手動移除有問題的訊息。

當這個屬性設定為 Drop 時,即會捨棄訊息。

當這個屬性設定為 Reject 時,負認可會傳送至用戶端,並從有害訊息佇列中移除訊息。 只有在 Message Queuing 4.0 上才能使用這個選項。

當設定為 Move 時,訊息會移到最後一個有害子佇列。 只有在 Message Queuing 4.0 上才能使用這個選項。

適用於