Sdílet prostřednictvím


NamespaceManager.GetTopic(String) Method

Definition

Retrieves the topic from the service namespace.

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

Parameters

path
String

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

Returns

A TopicDescription reference to the topic, or a MessagingEntityNotFoundException exception if the topic does not exist in the service namespace.

Exceptions

path is empty or null.

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 topic does not exist in the service namespace.

An internal error or unexpected exception occurs.

Applies to