CloudQueue.GetMessagesAsync 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
GetMessagesAsync(Int32, Nullable<TimeSpan>, QueueRequestOptions, OperationContext) |
Initiates an asynchronous operation to get the specified number of messages from the queue using the specified request options and operation context. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period. |
GetMessagesAsync(Int32, Nullable<TimeSpan>, QueueRequestOptions, OperationContext, CancellationToken) |
Initiates an asynchronous operation to get the specified number of messages from the queue using the specified request options and operation context. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period. |
GetMessagesAsync(Int32, CancellationToken) |
Initiates an asynchronous operation to get messages from the queue. |
GetMessagesAsync(Int32) |
Initiates an asynchronous operation to get messages from the queue. |
GetMessagesAsync(Int32, Nullable<TimeSpan>, QueueRequestOptions, OperationContext)
Initiates an asynchronous operation to get the specified number of messages from the queue using the specified request options and operation context. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.Storage.Queue.CloudQueueMessage>> GetMessagesAsync (int messageCount, TimeSpan? visibilityTimeout, Microsoft.Azure.Storage.Queue.QueueRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessagesAsync : int * Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
override this.GetMessagesAsync : int * Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
Public Overridable Function GetMessagesAsync (messageCount As Integer, visibilityTimeout As Nullable(Of TimeSpan), options As QueueRequestOptions, operationContext As OperationContext) As Task(Of IEnumerable(Of CloudQueueMessage))
Parameters
- messageCount
- Int32
The number of messages to retrieve. The maximum number of messages that may be retrieved at one time is 32.
- options
- QueueRequestOptions
A QueueRequestOptions object that specifies additional options for the request.
- operationContext
- OperationContext
An OperationContext object that represents the context for the current operation.
Returns
A Task<TResult> object that is an enumerable collection of type CloudQueueMessage that represents the asynchronous operation.
- Attributes
Applies to
GetMessagesAsync(Int32, Nullable<TimeSpan>, QueueRequestOptions, OperationContext, CancellationToken)
Initiates an asynchronous operation to get the specified number of messages from the queue using the specified request options and operation context. This operation marks the retrieved messages as invisible in the queue for the default visibility timeout period.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.Storage.Queue.CloudQueueMessage>> GetMessagesAsync (int messageCount, TimeSpan? visibilityTimeout, Microsoft.Azure.Storage.Queue.QueueRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessagesAsync : int * Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
override this.GetMessagesAsync : int * Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
Public Overridable Function GetMessagesAsync (messageCount As Integer, visibilityTimeout As Nullable(Of TimeSpan), options As QueueRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CloudQueueMessage))
Parameters
- messageCount
- Int32
The number of messages to retrieve. The maximum number of messages that may be retrieved at one time is 32.
- options
- QueueRequestOptions
A QueueRequestOptions object that specifies additional options for the request.
- operationContext
- OperationContext
An OperationContext object that represents the context for the current operation.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
A Task<TResult> object that is an enumerable collection of type CloudQueueMessage that represents the asynchronous operation.
- Attributes
Applies to
GetMessagesAsync(Int32, CancellationToken)
Initiates an asynchronous operation to get messages from the queue.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.Storage.Queue.CloudQueueMessage>> GetMessagesAsync (int messageCount, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessagesAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
override this.GetMessagesAsync : int * System.Threading.CancellationToken -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
Public Overridable Function GetMessagesAsync (messageCount As Integer, cancellationToken As CancellationToken) As Task(Of IEnumerable(Of CloudQueueMessage))
Parameters
- messageCount
- Int32
The number of messages to retrieve. The maximum number of messages that may be retrieved at one time is 32.
- cancellationToken
- CancellationToken
A CancellationToken to observe while waiting for a task to complete.
Returns
A Task<TResult> object that is an enumerable collection of type CloudQueueMessage that represents the asynchronous operation.
- Attributes
Applies to
GetMessagesAsync(Int32)
Initiates an asynchronous operation to get messages from the queue.
[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.Azure.Storage.Queue.CloudQueueMessage>> GetMessagesAsync (int messageCount);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessagesAsync : int -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
override this.GetMessagesAsync : int -> System.Threading.Tasks.Task<seq<Microsoft.Azure.Storage.Queue.CloudQueueMessage>>
Public Overridable Function GetMessagesAsync (messageCount As Integer) As Task(Of IEnumerable(Of CloudQueueMessage))
Parameters
- messageCount
- Int32
The number of messages to retrieve. The maximum number of messages that may be retrieved at one time is 32.
Returns
A Task<TResult> object that is an enumerable collection of type CloudQueueMessage that represents the asynchronous operation.
- Attributes
Applies to
Azure SDK for .NET