QueueClient.ReceiveMessagesAsync 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

ReceiveMessagesAsync()

Retrieves one or more messages from the front of the queue.

For more information, see Get Messages.

ReceiveMessagesAsync(CancellationToken)

Retrieves one or more messages from the front of the queue.

For more information, see Get Messages.

ReceiveMessagesAsync(Nullable<Int32>, Nullable<TimeSpan>, CancellationToken)

Retrieves one or more messages from the front of the queue.

For more information, see Get Messages.

ReceiveMessagesAsync()

Source:
QueueClient.cs
Source:
QueueClient.cs

Retrieves one or more messages from the front of the queue.

For more information, see Get Messages.

C#
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.QueueMessage[]>> ReceiveMessagesAsync();

Returns

Response<T> where T is an array of QueueMessage

Applies to

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

ReceiveMessagesAsync(CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Retrieves one or more messages from the front of the queue.

For more information, see Get Messages.

C#
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.QueueMessage[]>> ReceiveMessagesAsync(System.Threading.CancellationToken cancellationToken = default);

Parameters

cancellationToken
CancellationToken

Optional CancellationToken

Returns

Response<T> where T is an array of QueueMessage

Applies to

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview

ReceiveMessagesAsync(Nullable<Int32>, Nullable<TimeSpan>, CancellationToken)

Source:
QueueClient.cs
Source:
QueueClient.cs

Retrieves one or more messages from the front of the queue.

For more information, see Get Messages.

C#
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Storage.Queues.Models.QueueMessage[]>> ReceiveMessagesAsync(int? maxMessages = default, TimeSpan? visibilityTimeout = default, System.Threading.CancellationToken cancellationToken = default);

Parameters

maxMessages
Nullable<Int32>

Optional. A nonzero integer value that specifies the number of messages to retrieve from the queue, up to a maximum of 32. If fewer are visible, the visible messages are returned. By default, a single message is retrieved from the queue with this operation.

visibilityTimeout
Nullable<TimeSpan>

Optional. Specifies the new visibility timeout value, in seconds, relative to server time. The default value is 30 seconds.

cancellationToken
CancellationToken

Optional CancellationToken

Returns

Response<T> where T is an array of QueueMessage

Applies to

Azure SDK for .NET Preview and Azure SDK for .NET Latest
Product Versions
Azure SDK for .NET Latest, Preview