NamespaceManager.CreateTopic Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CreateTopic(String) |
Creates a new topic inside the service namespace with the given service namespace path. |
CreateTopic(TopicDescription) |
Creates a new topic inside the service namespace with the specified topic description. |
CreateTopic(String)
Creates a new topic inside the service namespace with the given service namespace path.
public Microsoft.ServiceBus.Messaging.TopicDescription CreateTopic (string path);
member this.CreateTopic : string -> Microsoft.ServiceBus.Messaging.TopicDescription
Public Function CreateTopic (path As String) As TopicDescription
Parameters
- path
- String
The path of the topic relative to the service namespace base address.
Returns
The TopicDescription of the newly created topic.
Exceptions
path
is null or empty, or path
begins or ends with “/”.
Length of path
is greater than
Microsoft.ServiceBus.Messaging.Constants.QueueNameMaximumLength.
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.
A queue or a topic with the same name and path exists under the same service namespace.
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.
Either the specified size in the description is not supported or the maximum allowable quota has been reached. You must specify one of the supported size values, delete existing entities, or increase your quota size.
An internal error or unexpected exception occurs.
Applies to
CreateTopic(TopicDescription)
Creates a new topic inside the service namespace with the specified topic description.
public Microsoft.ServiceBus.Messaging.TopicDescription CreateTopic (Microsoft.ServiceBus.Messaging.TopicDescription description);
member this.CreateTopic : Microsoft.ServiceBus.Messaging.TopicDescription -> Microsoft.ServiceBus.Messaging.TopicDescription
Public Function CreateTopic (description As TopicDescription) As TopicDescription
Parameters
- description
- TopicDescription
A TopicDescription object describing the attributes with which the new topic will be created.
Returns
The TopicDescription of the newly created topic.
Applies to
Azure SDK for .NET