MessageReceiver.ReceiveAsync 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
ReceiveAsync(TimeSpan) |
Asynchronously receives a message from the current queue or topic. |
ReceiveAsync() |
Asynchronously receives a message from the current queue or topic. |
ReceiveAsync(Int64) |
Asynchronously receives a deferred message from the current queue or topic. This method only works for deferred message, not regular one. |
ReceiveAsync(TimeSpan)
Asynchronously receives a message from the current queue or topic.
public System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage> ReceiveAsync (TimeSpan serverWaitTime);
abstract member ReceiveAsync : TimeSpan -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage>
override this.ReceiveAsync : TimeSpan -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage>
Public Function ReceiveAsync (serverWaitTime As TimeSpan) As Task(Of BrokeredMessage)
Parameters
- serverWaitTime
- TimeSpan
The time span the server waits before the operation times out.
Returns
The asynchronous operation.
Applies to
ReceiveAsync()
Asynchronously receives a message from the current queue or topic.
public System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage> ReceiveAsync ();
abstract member ReceiveAsync : unit -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage>
override this.ReceiveAsync : unit -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage>
Public Function ReceiveAsync () As Task(Of BrokeredMessage)
Returns
The asynchronous operation.
Applies to
ReceiveAsync(Int64)
Asynchronously receives a deferred message from the current queue or topic. This method only works for deferred message, not regular one.
public System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage> ReceiveAsync (long sequenceNumber);
abstract member ReceiveAsync : int64 -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage>
override this.ReceiveAsync : int64 -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.BrokeredMessage>
Public Function ReceiveAsync (sequenceNumber As Long) As Task(Of BrokeredMessage)
Parameters
- sequenceNumber
- Int64
The sequence number of the deferred message to receive.
Returns
The asynchronous operation.
Applies to
Azure SDK for .NET
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for