PROPID_Q_QUOTA (Compact 2013)
3/26/2014
Optional. This property specifies the maximum size (in kilobytes) of the queue.
- Type Indicator
VT_UI4
- PROPVARIANT Field
ulVal
Property Values
Size (in kilobytes) of the queue.The default is INFINITE.
Remarks
The PROPID_Q_QUOTAproperty is typically set when calling MQCreateQueue.
To set the maximum size when creating the queue, specify PROPID_Q_QUOTA in the MQQUEUEPROPS structure and call MQCreateQueue.
When the quota of a queue is reached, a negative acknowledgment message is returned to the administration queue of the sending application to indicate that the queue is full.
MSMQ continues to send negative acknowledgments until the cumulative size of messages in the queue drops below the quota.
To change the maximum size of a queue, specify PROPID_Q_QUOTA in the MQQUEUEPROPS structure and call MQSetQueueProperties with the new value.
When the quota of the queue is changed, the new quota affects only arriving messages; it does not affect messages in the queue.
To retrieve the maximum size of a queue, specify PROPID_Q_QUOTA in the MQQUEUEPROPS structure and call MQGetQueueProperties and examine its returned value.
Examples
The following examples show how PROPID_Q_QU0TA is specified in the MQQUEUEPROPS structure for setting and retrieving the maximum size of the queue.
To set the maximum size of the queue
aPropID[i] = PROPID_Q_QUOTA; // Property identifier
aVariant[i].vt = VT_UI4; // Type indicator
aVariant[i].ulVal = 1000; // Maximum size of the queue
i++;
To retrieve the maximum size of the queue
aPropID[i] = PROPID_Q_QUOTA; // Property identifier
aVariant[i].vt = VT_UI4; // Type indicator
i++;
Note
OS versions prior to 2.12 require the MSMQ add-on pack.
Requirements
Header |
mq.h |
See Also
Reference
MSMQ Properties
MQCreateQueue
MQGetQueueProperties
MQSetQueueProperties
MQQUEUEPROPS