Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 MQQUEUEPROPSstructure 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 MQQUEUEPROPSstructure and call MQSetQueuePropertieswith 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 MQQUEUEPROPSstructure and call MQGetQueuePropertiesand examine its returned value.
Examples
The following examples show how PROPID_Q_QU0TA is specified in the MQQUEUEPROPSstructure for setting and retrieving the maximum size of the queue.
To set the maximum size of the queue
Copy Code | |
---|---|
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
Copy Code | |
---|---|
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 |
Windows Embedded CE | Windows CE 2.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |