ServiceBusNamespaceClient.BeginCreateQueue Method (String, QueueDescription, AsyncCallback, Object)

Asynchronous version of CreateQueue(String, QueueDescription).

Namespace:  Microsoft.ServiceBus
Assembly:  Microsoft.ServiceBus.Messaging (in Microsoft.ServiceBus.Messaging.dll)


Public Function BeginCreateQueue ( _
    path As String, _
    description As QueueDescription, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
Dim instance As ServiceBusNamespaceClient
Dim path As String
Dim description As QueueDescription
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

returnValue = instance.BeginCreateQueue(path, _
    description, callback, state)
public IAsyncResult BeginCreateQueue(
    string path,
    QueueDescription description,
    AsyncCallback callback,
    Object state
IAsyncResult^ BeginCreateQueue(
    String^ path, 
    QueueDescription^ description, 
    AsyncCallback^ callback, 
    Object^ state
member BeginCreateQueue : 
        path:string * 
        description:QueueDescription * 
        callback:AsyncCallback * 
        state:Object -> IAsyncResult 
public function BeginCreateQueue(
    path : String, 
    description : QueueDescription, 
    callback : AsyncCallback, 
    state : Object
) : IAsyncResult


  • path
    Type: System.String
    Path of the queue relative to the service namespace base address.

Return Value

Type: System.IAsyncResult
An IAsyncResult object that references the asynchronously created queue.


Exception Condition

path is null or empty.


Length of path is greater than QueueNameMaximumLength().


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.


A queue with the same name and path exists under the same service namespace.


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


The maximum allowable quota has been reached. You must delete existing entities or increase your quota size.


An internal error or unexpected exception occurs.


The server is overloaded with logical operations. You can consider any of the following actions:

  • Wait and retry calling this function.

  • Remove entities before retry (for example, receive messages before sending any more).

See Also


ServiceBusNamespaceClient Class

BeginCreateQueue Overload

Microsoft.ServiceBus Namespace