MessageQueue.GetPublicQueuesByCategory Method (Guid)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Retrieves all the public queues on the network that belong to the specified category.

Namespace:   System.Messaging
Assembly:  System.Messaging (in System.Messaging.dll)

static member GetPublicQueuesByCategory : 
        category:Guid -> MessageQueue[]

Parameters

category
Type: System.Guid

A Guid that groups the set of queues to be retrieved.

Return Value

Type: System.Messaging.MessageQueue[]

An array of MessageQueue objects that reference the retrieved public queues.

Exception Condition
MessageQueueException

An error occurred when accessing a Message Queuing method.

Use this method to filter the public queues by category. The Category property provides access to the Message Queuing type ID property (which is read/write) of a particular queue. Although you can use NewGuid to create a category value that is unique across all Guid values, it is not necessary. 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.

GetPublicQueuesByCategory(Guid) retrieves a static snapshot of the queues. To interact with a dynamic list of the queues, use GetMessageQueueEnumerator. You can specify the category as part of the MessageQueueCriteria you pass into the method.

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

Workgroup mode

Available

Local computer

No

Local computer and direct format name

No

Remote computer

No

Remote computer and direct format name

No

The following code example retrieves lists of queues.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: