Quota
MSMQQueueInfo

Optional. The Quota property specifies the maximum size (in kilobytes) of the queue.

Quick Info

Type: Long
Run time: read/write

Syntax

object.Quota
 
Syntax Element Description
object Queue information (MSMQQueueInfo) object that defines the queue.

Settings

Long integer (default is INFINITE). Maximum size is based on the memory available in the computer where the queue's messages are stored.

Remarks

Quota is typically set when the queue is created.

To set the quota of a queue, set Quota and call the MSMQQueueInfo object's Create method.

To reset the quota of a queue after the queue is created, set Quota to a new level and, if the queue is open, call the MSMQQueueInfo object's Update method. If the queue is not open do not call Update, the queue's properties are updated automatically when the queue is opened.

To find the quota of a queue, call the MSMQQueueInfo object's Refresh method.

Example

This example creates a private queue on the local machine, setting the queue's quota to 10K. To try this example using Microsoft Visual Basic (version 5.0), paste the code into the Code window of a form, and then run the example and click the form.

Dim qinfo As MSMQQueueInfo
   
Private Sub Form_Click()
    
  Set qinfo = New MSMQQueueInfo
  qinfo.PathName = ".\myqueue"
  qinfo.Label = "Test Queue"
  qinfo.Quota = 10
  qinfo.Create
   
  MsgBox "Queue's Format name is: " + qinfo.FormatName

End Sub 
 

See Also

Create, FormatName, Label, MSMQQueueInfo, PathName, Update


© 1997 by Microsoft Corporation. All rights reserved.