ServiceBusNamespaceClient.BeginCreateTopic Method (String, TopicDescription, AsyncCallback, Object)
Asynchronous version of CreateTopic(String, TopicDescription).
Namespace: Microsoft.ServiceBus
Assembly: Microsoft.ServiceBus.Messaging (in Microsoft.ServiceBus.Messaging.dll)
Syntax
'Declaration
Public Function BeginCreateTopic ( _
path As String, _
description As TopicDescription, _
callback As AsyncCallback, _
state As Object _
) As IAsyncResult
'Usage
Dim instance As ServiceBusNamespaceClient
Dim path As String
Dim description As TopicDescription
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult
returnValue = instance.BeginCreateTopic(path, _
description, callback, state)
public IAsyncResult BeginCreateTopic(
string path,
TopicDescription description,
AsyncCallback callback,
Object state
)
public:
IAsyncResult^ BeginCreateTopic(
String^ path,
TopicDescription^ description,
AsyncCallback^ callback,
Object^ state
)
member BeginCreateTopic :
path:string *
description:TopicDescription *
callback:AsyncCallback *
state:Object -> IAsyncResult
public function BeginCreateTopic(
path : String,
description : TopicDescription,
callback : AsyncCallback,
state : Object
) : IAsyncResult
Parameters
- path
Type: System.String
Path of the topic relative to the service namespace base address.
- description
Type: Microsoft.ServiceBus.Messaging.TopicDescription
A TopicDescription object.
- callback
Type: System.AsyncCallback
A AsyncCallback delegate that references the method to invoke when the operation is complete.
- state
Type: System.Object
A user-defined object that contains information about the receive operation. This object is passed to the EndCreateTopic(IAsyncResult) delegate when the operation is complete.
Return Value
Type: System.IAsyncResult
An IAsyncResult object that references the asynchronously created topic.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | description is null. |
ArgumentException | path is null or empty, or path starts or ends with "/". |
ArgumentOutOfRangeException | Length of path is greater than QueueNameMaximumLength(). |
TimeoutException | The operation times out. The timeout period is initialized through the ServiceBusNamespaceClientSettings class. You may need to increase the value of the OperationTimeout property to avoid this exception if the timeout value is relatively low. |
MessagingEntityAlreadyExistsException | A queue or a topic with the same name and path exists under the same service namespace. |
QuotaExceededException | The maximum allowable quota has been reached. You must delete existing entities or increase your quota size. |
MessagingException | An internal error or unexpected exception occurs. |