Compartir a través de


PROPID_Q_QUOTA

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

MQCreateQueue
MQGetQueueProperties
MQSetQueueProperties
MQQUEUEPROPS