Condividi tramite


ManagementClient.CreateQueueAsync Method

Definition

Overloads

CreateQueueAsync(QueueDescription, CancellationToken)

Creates a new queue in the service namespace with the given name.

CreateQueueAsync(String, CancellationToken)

Creates a new queue in the service namespace with the given name.

CreateQueueAsync(QueueDescription, CancellationToken)

Source:
ManagementClient.cs

Creates a new queue in the service namespace with the given name.

public virtual System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription> CreateQueueAsync (Microsoft.Azure.ServiceBus.Management.QueueDescription queueDescription, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateQueueAsync : Microsoft.Azure.ServiceBus.Management.QueueDescription * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription>
override this.CreateQueueAsync : Microsoft.Azure.ServiceBus.Management.QueueDescription * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription>
Public Overridable Function CreateQueueAsync (queueDescription As QueueDescription, Optional cancellationToken As CancellationToken = Nothing) As Task(Of QueueDescription)

Parameters

queueDescription
QueueDescription

A QueueDescription object describing the attributes with which the new queue will be created.

cancellationToken
CancellationToken

Returns

The QueueDescription of the newly created queue.

Exceptions

Queue name is null or empty.

A queue with the same nameexists under the same service namespace.

The operation times out.

No sufficient permission to perform this operation. You should check to ensure that your ManagementClient 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.

The server is busy. You should wait before you retry the operation.

An internal error or unexpected exception occurs.

Remarks

Throws if a queue already exists.

Applies to

CreateQueueAsync(String, CancellationToken)

Source:
ManagementClient.cs

Creates a new queue in the service namespace with the given name.

public virtual System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription> CreateQueueAsync (string queuePath, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateQueueAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription>
override this.CreateQueueAsync : string * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.ServiceBus.Management.QueueDescription>
Public Overridable Function CreateQueueAsync (queuePath As String, Optional cancellationToken As CancellationToken = Nothing) As Task(Of QueueDescription)

Parameters

queuePath
String

The name of the queue relative to the service namespace base address.

cancellationToken
CancellationToken

Returns

The QueueDescription of the newly created queue.

Exceptions

Queue name is null or empty.

The length of queuePath is greater than 260 characters.

An entity with the same name exists under the same service namespace.

The operation times out. The timeout period is initialized through the ServiceBusConnection class. You may need to increase the value of timeout to avoid this exception if the timeout value is relatively low.

No sufficient permission to perform this operation. You should check to ensure that your ManagementClient 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.

The server is busy. You should wait before you retry the operation.

An internal error or unexpected exception occurs.

Remarks

Throws if a queue already exists. QueueDescription for default values of queue properties.

Applies to