Message.UseJournalQueue 屬性

定義

取得或設定值,指出訊息複本是否應保留在原始電腦上的電腦日誌中。Gets or sets a value that indicates whether a copy of the message should be kept in a machine journal on the originating computer.

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

屬性值

Boolean

如果要求在訊息成功地傳輸 (從原始電腦至下一個伺服器) 後,在原始電腦的電腦日誌中保留訊息的複本則為 true,否則為 falsetrue to require that a copy of a message be kept in the originating computer's machine journal after the message has been successfully transmitted (from the originating computer to the next server); otherwise, false. 預設為 falseThe default is false.

屬性

例外狀況

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

範例

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

備註

UseJournalQueueUseDeadLetterQueue 屬性會指定訊息佇列追蹤訊息的方式。The UseJournalQueue and UseDeadLetterQueue properties specify how Message Queuing tracks a message. 如果 UseJournalQueuetrue ,則會在傳送訊息的每個步驟中,將複本保存在來源電腦的電腦日誌中。If UseJournalQueue is true, then a copy is kept in the computer journal on the originating machine at each step that a message is transmitted.

只有當目的地佇列位於遠端電腦上時,才會將傳送的訊息複製到日誌佇列。The sent message is only copied to the journal queue if the destination queue is on a remote computer. 如果目的地是在本機電腦上,則會將訊息直接傳送至佇列;沒有任何中繼步驟需要日誌。If the destination is on the local computer, the message is sent directly to the queue; there are no intermediate steps to require journaling.

當您將訊息儲存在日誌佇列時,請定期清除佇列,以移除不再需要的訊息。When you store messages in a journal queue, clear the queue periodically to remove messages that are no longer needed. 儲存在日誌佇列中的訊息會依佇列所在之電腦的配額計算。Messages stored in journal queues count against the quota for the computer where the queue resides. (電腦配額是由系統管理員設定。 ) (The computer quota is set by the administrator.)

您不會建立日誌或寄不出的信件佇列。You do not create a journal or dead-letter queue. 這些都是訊息佇列所產生的兩個系統佇列。These are both system queues that Message Queuing generates.

適用於

另請參閱