EventHubReceiver.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() |
Asynchronous version of Receive(). |
ReceiveAsync(Int32) |
Asynchronous version of Receive(Int32). |
ReceiveAsync(TimeSpan) |
Asynchronous version of Receive(TimeSpan). |
ReceiveAsync(Int32, TimeSpan) |
Asynchronous version of Receive(Int32, TimeSpan). |
ReceiveAsync()
Asynchronous version of Receive().
public System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.EventData> ReceiveAsync ();
member this.ReceiveAsync : unit -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.EventData>
Public Function ReceiveAsync () As Task(Of EventData)
Returns
The task representing the asynchronous operation.
Applies to
ReceiveAsync(Int32)
Asynchronous version of Receive(Int32).
public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.EventData>> ReceiveAsync (int maxCount);
member this.ReceiveAsync : int -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.EventData>>
Public Function ReceiveAsync (maxCount As Integer) As Task(Of IEnumerable(Of EventData))
Parameters
- maxCount
- Int32
The maximum amount of event data the user is willing to accept in one call.
Returns
Returns Task<TResult>.
Remarks
Service does not wait for maxCount
events to be filled before returning to user. It returns as soon as there are any events available.
Applies to
ReceiveAsync(TimeSpan)
Asynchronous version of Receive(TimeSpan).
public System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.EventData> ReceiveAsync (TimeSpan waitTime);
member this.ReceiveAsync : TimeSpan -> System.Threading.Tasks.Task<Microsoft.ServiceBus.Messaging.EventData>
Public Function ReceiveAsync (waitTime As TimeSpan) As Task(Of EventData)
Parameters
- waitTime
- TimeSpan
The maximum time the user is willing to wait for event data to arrive.
Returns
The task representing the asynchronous operation.
Remarks
waitTime
is not a guaranteed wait time, as API will return data as soon as it is available.
Applies to
ReceiveAsync(Int32, TimeSpan)
Asynchronous version of Receive(Int32, TimeSpan).
public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.EventData>> ReceiveAsync (int maxCount, TimeSpan waitTime);
member this.ReceiveAsync : int * TimeSpan -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.EventData>>
Public Function ReceiveAsync (maxCount As Integer, waitTime As TimeSpan) As Task(Of IEnumerable(Of EventData))
Parameters
- maxCount
- Int32
The maximum amount of event data the user is willing to accept in one call.
- waitTime
- TimeSpan
The maximum time the user is willing to wait for event data to arrive.
Returns
Returns Task<TResult>.
Remarks
waitTime
is not a guaranteed wait time, as API will return data as soon as it is available. Also service does not wait for maxCount
events to be filled before returning to user. It returns as soon as there are any events available.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기