MessageQueue.MaximumJournalSize Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the maximum size of the journal queue.

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

public long MaximumJournalSize { get; set; }

Property Value

Type: System.Int64

The maximum size, in kilobytes, of the journal queue. The Message Queuing default specifies that no limit exists.

Exception Condition

The maximum journal queue size was set to an invalid value.


An error occurred when accessing a Message Queuing method.

MaximumJournalSize provides access to the Message Queuing journal storage limit. It is relevant only when UseJournalQueue is true. Setting this property modifies the Message Queuing queue. 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


Local computer


Local computer and direct format name


Remote computer


Remote computer and direct format name


The 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}",

.NET Framework
Available since 1.1
Return to top