ServiceBusNamespaceClient.BeginCreateQueue Method (String, AsyncCallback, Object)

Asynchronous version of CreateQueue(String).

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

Syntax

'Declaration
Public Function BeginCreateQueue ( _
    path As String, _
    callback As AsyncCallback, _
    state As Object _
) As IAsyncResult
'Usage
Dim instance As ServiceBusNamespaceClient
Dim path As String
Dim callback As AsyncCallback
Dim state As Object
Dim returnValue As IAsyncResult

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

Parameters

  • 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.

Exceptions

Exception Condition
ArgumentException

path is null or empty.

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 with the same name and path exists under the same service namespace.

UnauthorizedAccessException

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.

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.

See Also

Reference

ServiceBusNamespaceClient Class

BeginCreateQueue Overload

Microsoft.ServiceBus Namespace