The PROPID_Q_JOURNAL_QUOTA property specifies the maximum size (in kilobytes) of the queue journal.
Maximum size (in kilobytes) of the queue journal (the default is INFINITE).
PROPID_Q_JOURNAL_QUOTA is used to set the maximum size of the queue journal when target journaling is enabled. Target journaling is enabled by setting the PROPID_Q_JOURNAL property of the destination queue.
Periodically clear messages from the queue journal to remove messages that are no longer needed. Messages stored in the queue journal count against the quota of the journal and the quota of the computer where the queue journal resides (the computer quota is set by the administrator).
If the journal or computer quota is exceeded, Message Queuing will not send copies of the messages to the journal when the messages are received.
To reset the maximum size of a queue journal, specify PROPID_Q_JOURNAL_QUOTA in the MQQUEUEUPROPS structure and call MQSetQueueProperties.
To retrieve the maximum size of a queue journal, specify PROPID_Q_JOURNAL_QUOTA in the MQQUEUEPROPS structure, and then call MQGetQueueProperties and examine its returned value.
When retrieving the journal quota, the type indicator can be set to VT_UI4 or VT_NULL. If you set the type indicator equal to VT_NULL, Message Queuing automatically changes the type indicator to VT_UI4 during the function call.
Equivalent COM Property
When using COM components, the maximum size of the queue journal can be set and retrieved using the MSMQQueueInfo.JournalQuota property.
The following code fragments show how PROPID_Q_JOURNAL_QUOTA is specified in arrays that can be used to initialize an MQQUEUEPROPS structure when setting (or resetting) and retrieving the quota of the queue journal.
To Set or Reset the Journal Quota
aQueuePropID[i] = PROPID_Q_JOURNAL_QUOTA; // Property identifier aQueuePropVar[i].vt = VT_UI4; // Type indicator aQueuePropVar[i].ulVal = 1000; // Maximum size of queue journal i++;
To Retrieve the Journal Quota
aQueuePropID[i] = PROPID_Q_JOURNAL_QUOTA; // Property identifier aQueuePropVar[i].vt = VT_NULL; // Type indicator i++;
The following examples are included in Using Message Queuing.
|For an example of||See|
Setting the maximum size of the queue journal
Retrieving the maximum size of the queue journal
Queue Properties, MQCreateQueue, MQGetQueueProperties, MQQUEUEPROPS, MQSetQueueProperties, PROPID_Q_JOURNAL