Optional. The JournalQuota property specifies the maximum size (in kilobytes) of the queue journal.
Type: | Long |
Run time: | read/write |
object.Journal
Syntax Element | Description |
object | Queue information (MSMQQueueInfo) object that defines the queue. |
Maximum size (in kilobytes) of the queue journal (the default is INFINITE).
JournalQuota is used along with Journal to tell MSMQ to start storing a copy of the messages retrieved from the queue. For information on accessing queue journals, see Journal Queues.
To set the size of the journal queue, set JournalQuota and call the MSMQQueueInfo object's Create method.
To reset the size of a journal queue after the queue is created, set JournalQuota to a new value and, if the queue is open, call the MSMQQueueInfo object's Update method. If the queue is not open do not call Update, the queue's properties are updated automatically when the queue is opened.
To find the size of a journal queue, call the MSMQQueueInfo object's Refresh method.
This example creates a private queue on the local machine, attaching a journal queue to the created queue whose size is 7K. To try this example using Microsoft Visual Basic (version 5.0), paste the code into the Code window of a form, and then run the example and click the form.
Dim qinfo As MSMQQueueInfo Private Sub Form_Click() Set qinfo = New MSMQQueueInfo qinfo.PathName = ".\PRIVATE$\JournalQuotaTest" qinfo.Label = "Test Queue" qinfo.Journal = MQ_JOURNAL qinfo.JournalQuota = 7 qinfo.Create MsgBox "Queue's Format name is: " + qinfo.FormatName End Sub
Create, FormatName, Journal, Label, MSMQQueueInfo, Refresh, PathName Update