MessageQueue.MaximumJournalSize 屬性

定義

取得或設定日誌佇列的最大大小。Gets or sets the maximum size of the journal queue.

public:
 property long MaximumJournalSize { long get(); void set(long value); };
[System.ComponentModel.TypeConverter(typeof(System.Messaging.Design.SizeConverter))]
[System.Messaging.MessagingDescription("MQ_MaximumJournalSize")]
public long MaximumJournalSize { get; set; }
[System.Messaging.MessagingDescription("MQ_MaximumJournalSize")]
public long MaximumJournalSize { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Messaging.Design.SizeConverter))>]
[<System.Messaging.MessagingDescription("MQ_MaximumJournalSize")>]
member this.MaximumJournalSize : int64 with get, set
[<System.Messaging.MessagingDescription("MQ_MaximumJournalSize")>]
member this.MaximumJournalSize : int64 with get, set
Public Property MaximumJournalSize As Long

屬性值

Int64

日誌佇列大小的最大值 (以 KB 為單位)。The maximum size, in kilobytes, of the journal queue. 訊息佇列預設不指定上限。The Message Queuing default specifies that no limit exists.

屬性

例外狀況

日誌佇列的最大值設定為無效值。The maximum journal queue size was set to an invalid value.

存取訊息佇列方法時發生錯誤。An error occurred when accessing a Message Queuing method.

範例

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

// Set the queue's MaximumJournalSize property value.
queue.MaximumJournalSize = 10;

// Display the new value of the queue's MaximumJournalSize property.
Console.WriteLine("MessageQueue.MaximumJournalSize: {0}",
    queue.MaximumJournalSize);

備註

MaximumJournalSize 提供存取訊息佇列的日誌儲存空間限制。MaximumJournalSize provides access to the Message Queuing journal storage limit. 只有當為時,才會相關 UseJournalQueue trueIt is relevant only when UseJournalQueue is true. 設定這個屬性會修改訊息佇列的佇列。Setting this property modifies the Message Queuing queue. 因此,任何其他 MessageQueue 實例都會受到變更的影響。Therefore, any other MessageQueue instances are affected by the change

如果您將訊息儲存在日誌或寄不出的信件佇列中,您應該定期清除佇列,以移除不再需要的訊息。If you store messages in a journal or dead-letter queue, you should periodically clear the queue to remove messages that are no longer needed. 這類佇列中的訊息會指向佇列所在之電腦的訊息配額。Messages in such a queue count toward the message quota for the computer where the queue resides. (系統管理員設定電腦配額。 ) (The administrator sets the computer quota.)

下表顯示此屬性是否適用于各種工作組模式。The following table shows whether this property is available in various Workgroup modes.

工作組模式Workgroup mode 可用Available
本機電腦Local computer Yes
本機電腦和直接格式名稱Local computer and direct format name Yes
遠端電腦Remote computer No
遠端電腦和直接格式名稱Remote computer and direct format name No

適用於

另請參閱