Share via


NamespaceManager.GetQueue(String) Method

Definition

Retrieves a queue from the service namespace.

public Microsoft.ServiceBus.Messaging.QueueDescription GetQueue (string path);
member this.GetQueue : string -> Microsoft.ServiceBus.Messaging.QueueDescription
Public Function GetQueue (path As String) As QueueDescription

Parameters

path
String

The path of the queue relative to the service namespace base address.

Returns

A QueueDescription handle to the queue, or a MessagingEntityNotFoundException exception if the queue does not exist in the service namespace.

Exceptions

path is empty or null, or path starts or ends with "/".

The operation times out. The timeout period is initialized through the NamespaceManagerSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low.

The NamespaceManager object does not have sufficient permission to perform this operation. You should check to ensure that your NamespaceManager has the correct TokenProvider credentials to perform this operation.

The queue does not exist in the service namespace.

An internal error or unexpected exception occurs.

Applies to