Share via


PROPID_Q_JOURNAL_QUOTA

 

Applies To: Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server Technical Preview, Windows Vista

The PROPID_Q_JOURNAL_QUOTA property specifies the maximum size (in kilobytes) of the queue journal.

Property ID

PROPID_Q_JOURNAL_QUOTA

Type Indicator

VT_UI4

MQPROPVARIANT Field

ulVal

Property Value

Maximum size (in kilobytes) of the queue journal (the default is INFINITE).

Remarks

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 set the maximum size of a queue journal when creating the application queue, include PROPID_Q_JOURNAL_QUOTA in the MQQUEUEPROPS structure and call MQCreateQueue.

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.

Example Code

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 C/C++ Code Example: Setting PROPID_Q_JOURNAL_QUOTA
Retrieving the maximum size of the queue journal C/C++ Code Example: Retrieving PROPID_Q_JOURNAL_QUOTA

See Also

Queue Properties, MQCreateQueue, MQGetQueueProperties, MQQUEUEPROPS, MQSetQueueProperties, PROPID_Q_JOURNAL