Message.Recoverable 屬性

定義

取得或設定值,指出當發生電腦故障或網路問題時是否保證傳遞訊息。Gets or sets a value that indicates whether the message is guaranteed to be delivered in the event of a computer failure or network problem.

public:
 property bool Recoverable { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgRecoverable")]
public bool Recoverable { get; set; }
[<System.Messaging.MessagingDescription("MsgRecoverable")>]
member this.Recoverable : bool with get, set
Public Property Recoverable As Boolean

屬性值

Boolean

如果保證傳送訊息 (路由途中將訊息儲存在磁碟上) 則為 true,如果不保證傳送則為 falsetrue if delivery of the message is guaranteed (through saving the message to disk while en route); false if delivery is not assured. 預設為 falseThe default is false.

屬性

例外狀況

篩選訊息佇列以忽略 Recoverable 屬性。The message queue is filtered to ignore the Recoverable property.

範例

下列程式碼範例會取得並設定訊息屬性的值 RecoverableThe following code example gets and sets the value of a message's Recoverable property.

備註

Recoverable屬性會指出是否保證訊息的傳遞,即使當訊息是路由傳送至目的地佇列時,電腦也會當機。The Recoverable property indicates whether the delivery of a message is guaranteed - even if a computer crashes while the message is en route to the destination queue.

如果保證訊息的傳遞,訊息會在路由中的每個步驟上儲存于本機,直到訊息成功轉送到下一部電腦為止。If delivery of a message is guaranteed, the message is stored locally at every step along the route, until the message is successfully forwarded to the next computer. Recoverable 屬性設為 true 可能會影響輸送量。Setting the Recoverable property to true could affect throughput.

如果訊息為交易式,則不論屬性的值為何,訊息佇列都會自動將訊息視為可復原 RecoverableIf the message is transactional, Message Queuing automatically treats the message as recoverable, regardless of the value of the Recoverable property.

適用於

另請參閱