NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

MessageQueue.MaximumJournalSize

Gets or sets the maximum size of the journal queue.

[Visual Basic]
Overridable Public Property MaximumJournalSize As Long
[C#]
public long MaximumJournalSize {virtual get; virtual set;}
[C++]
public: __property virtual __int64 get_MaximumJournalSize();
public: __property virtual void set_MaximumJournalSize(__int64);
[JScript]
public function get MaximumJournalSize() : long;
public function set MaximumJournalSize(long);

Property Value

The maximum size in kilobytes of the journal queue. The Message Queuing default is no limit.

Exceptions

Exception Type Condition
ArgumentException The maximum journal queue size was set to an invalid value.
MessageQueueException The attempt to get or set the maximum journal queue size generated an internal error on the message queue component. The error is specified by the given status message.

Remarks

MaximumJournalSize provides access to the Message Queuing journal storage limit. It is only relevant when UseJournalQueue is set to true.

When you store messages in a journal or dead-letter queue, clear these queues periodically to remove messages that are no longer needed. Messages stored in journal and dead-letter queues count against the quota for the computer where the queues reside (the computer quota is set by the administrator).

Example [Visual Basic]

The following example demonstrates creating a new Message Queuing backend queue object and setting the MaximumJournalSize and MaximumQueueSize for the queue. A message is then sent to the queue to test the connection. This example assumes you have a Message Queuing server called myComputer and a queue called myNewQueue does not exist yet on the computer.

[Visual Basic]

Private Sub CreateNewQueue()
    'Define a MessageQueue.
    Dim mq As MessageQueue
    'Set the MessageQueue to point to a new queue.
    mq = MessageQueue.Create("myComputer\myNewQueue")

    'Use the journal queue for all received messages.
    mq.UseJournalQueue = True
    'Set the size in kilobytes of the journal queue.
    mq.MaximumJournalSize = 5
    'Set the size in kilobytes of the queue.
    mq.MaximumQueueSize = 10
    'Send a message to the new queue.
    mq.Send("Test")
End Sub

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | UseJournalQueue | MaximumQueueSize