Share via


Message Queue Configuration Properties 

There are a variety of properties you can manipulate on the queues and MessageQueue components you create. You can define these properties to help you set values that guide the queue's behavior, or query these properties to retrieve information about a queue with which your component interacts.

Properties That Reference a Queue

You use the Path property to determine what queue your component references. The path can be identified in one of three ways — by the physical path to the queue, by the queue's format name, or by the queue's descriptive label. For a full explanation of the differences between path, format name, and label, see Queue Reference Recommendations.

Queues can also be classified according to a category. You can use the Category property to determine the type of queue you are working with. Category is a GUID that is defined by the owner of the queue. You can either use a GUID-generation tool or make up your own number for the GUID. Category GUIDs do not have to be unique except within a single category. For example, you might define the same category for all of your order processing queues. This would allow you to retrieve all of them by that GUID.

Properties That Determine What Type of Data You Can Send

You use the Formatter property to determine how your message content will be serialized into a message before being sent to a queue, and how it will be extracted from a message after being received from a queue. Setting the Formatter property determines what type of content you can send in a message. For more information, see Message Serialization.

Properties That Control Interaction with a Queue

You can use the following properties to control how your component interacts with a queue:

  • You can use the DenySharedReceive property to indicate that only one component at a time may look at the messages in a queue. This can be extremely useful in multi-user situations. When DenySharedReceive is set, the first component to peek at or receive messages off a queue is the only component that may perform these operations at that time. When the first component finishes its instance of that queue, it releases the queue either through garbage collection or by calling Close. For more information about garbage collection, see Garbage Collection.

  • You can use the CanRead and CanWrite properties to determine if you have read and write access to a particular queue, or to set a queue to allow read and write access.

  • You can use the MaximumQueueSize and MaximumJournalSize properties to determine the capacity, in kilobytes, of messages that a queue can receive. Once this maximum has been reached, messages are no longer accepted by the queue. By default, the maximum queue size defaults to the queue size set by the system administrator for Message Queuing. If no limit has been set, default queue size is infinite.

  • You can use the UseJournalQueue property to determine whether copies of the messages retrieved from the queue are added to a journal queue.

See Also

Tasks

How to: Create MessageQueue Component Instances

Reference

MessageQueue

Other Resources

Garbage Collection