This documentation is archived and is not being maintained.

MessageQueue.Category Property

Gets or sets the queue category.

[Visual Basic]
Public Property Category As Guid
[C#]
public Guid Category {get; set;}
[C++]
public: __property Guid get_Category();
public: __property void set_Category(Guid);
[JScript]
public function get Category() : Guid;
public function set Category(Guid);

Property Value

A Guid that represents the queue category (Message Queuing type identifier), which allows an application to categorize its queues. The default is Guid.empty.

Exceptions

Exception Type Condition
ArgumentException The queue category was set to an invalid value.
MessageQueueException An error occurred when accessing a Message Queuing API.

Remarks

The queue category allows an application to categorize its queues. For example, you can place all Billing queues in one category and all Order queues in another.

The Category property provides access to the Message Queuing Type ID property (which is read/write), accessible through the Queue Properties dialog box on the Computer Management Console. You can define a new category. Although you can use NewGuid to create a category value that is unique across all Guid values, such an action is unnecessary. The category value needs to be distinct only from other categories, not from all other Guid values. For example, you can assign {00000000-0000-0000-0000-000000000001} as the Category for one set of queues and {00000000-0000-0000-0000-000000000002} as the Category for another set.

It is not necessary to set the Category. The value can be a null reference (Nothing in Visual Basic).

Setting this property modifies the Message Queuing queue. Therefore, any other MessageQueue instances are affected by the change.

The following table shows whether this property is available in various Workgroup modes.

Workgroup Mode Available
Local computer Yes
Local computer + direct format name Yes
Remote computer No
Remote computer + direct format name No

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

.NET Framework Security: 

See Also

MessageQueue Class | MessageQueue Members | System.Messaging Namespace | Id | Label | GetPublicQueuesByCategory | GetPublicQueues

Show: