CloudQueue.GetMessageAsync Method

Definition

Overloads

GetMessageAsync()

Initiates an asynchronous operation to get a single message from the queue.

GetMessageAsync(CancellationToken)

Initiates an asynchronous operation to get a single message from the queue.

GetMessageAsync(Nullable<TimeSpan>, QueueRequestOptions, OperationContext)

Initiates an asynchronous operation to get a single message from the queue, and specifies how long the message should be reserved before it becomes visible, and therefore available for deletion.

GetMessageAsync(Nullable<TimeSpan>, QueueRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get a single message from the queue, and specifies how long the message should be reserved before it becomes visible, and therefore available for deletion.

GetMessageAsync()

Initiates an asynchronous operation to get a single message from the queue.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> GetMessageAsync ();
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessageAsync : unit -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.GetMessageAsync : unit -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function GetMessageAsync () As Task(Of CloudQueueMessage)

Returns

A Task<TResult> object of type CloudQueueMessage that represents the asynchronous operation.

Attributes

Applies to

GetMessageAsync(CancellationToken)

Initiates an asynchronous operation to get a single message from the queue.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> GetMessageAsync (System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessageAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.GetMessageAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function GetMessageAsync (cancellationToken As CancellationToken) As Task(Of CloudQueueMessage)

Parameters

cancellationToken
CancellationToken

A CancellationToken to observe while waiting for a task to complete.

Returns

A Task<TResult> object of type CloudQueueMessage that represents the asynchronous operation.

Attributes

Applies to

GetMessageAsync(Nullable<TimeSpan>, QueueRequestOptions, OperationContext)

Initiates an asynchronous operation to get a single message from the queue, and specifies how long the message should be reserved before it becomes visible, and therefore available for deletion.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> GetMessageAsync (TimeSpan? visibilityTimeout, Microsoft.Azure.Storage.Queue.QueueRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessageAsync : Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.GetMessageAsync : Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function GetMessageAsync (visibilityTimeout As Nullable(Of TimeSpan), options As QueueRequestOptions, operationContext As OperationContext) As Task(Of CloudQueueMessage)

Parameters

visibilityTimeout
Nullable<TimeSpan>

A TimeSpan specifying the visibility timeout interval.

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 of type CloudQueueMessage that represents the asynchronous operation.

Attributes

Applies to

GetMessageAsync(Nullable<TimeSpan>, QueueRequestOptions, OperationContext, CancellationToken)

Initiates an asynchronous operation to get a single message from the queue, and specifies how long the message should be reserved before it becomes visible, and therefore available for deletion.

[Microsoft.Azure.Storage.DoesServiceRequest]
public virtual System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage> GetMessageAsync (TimeSpan? visibilityTimeout, Microsoft.Azure.Storage.Queue.QueueRequestOptions options, Microsoft.Azure.Storage.OperationContext operationContext, System.Threading.CancellationToken cancellationToken);
[<Microsoft.Azure.Storage.DoesServiceRequest>]
abstract member GetMessageAsync : Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
override this.GetMessageAsync : Nullable<TimeSpan> * Microsoft.Azure.Storage.Queue.QueueRequestOptions * Microsoft.Azure.Storage.OperationContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Azure.Storage.Queue.CloudQueueMessage>
Public Overridable Function GetMessageAsync (visibilityTimeout As Nullable(Of TimeSpan), options As QueueRequestOptions, operationContext As OperationContext, cancellationToken As CancellationToken) As Task(Of CloudQueueMessage)

Parameters

visibilityTimeout
Nullable<TimeSpan>

A TimeSpan specifying the visibility timeout interval.

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 of type CloudQueueMessage that represents the asynchronous operation.

Attributes

Applies to