PROPID_Q_QUOTA (Windows CE 5.0)
Optional. This property specifies the maximum size (in kilobytes) of the queue.
Type Indicator
VT_UI4PROPVARIANT Field
ulValProperty Values
Size (in kilobytes) of the queue.The default is INFINITE.
Remarks
The PROPID_Q_QUOTA property 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++;
Requirements
OS Versions: Windows CE 2.0 and later. Versions prior to 2.12 require the MSMQ add-on pack.
Header: Mq.h.
See Also
MQCreateQueue | MQGetQueueProperties | MQSetQueueProperties | MQQUEUEPROPS
Send Feedback on this topic to the authors