你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

QueueClient.ReceiveBatchAsync 方法

定义

重载

ReceiveBatchAsync(IEnumerable<Int64>)

异步接收消息批。

ReceiveBatchAsync(Int32)

异步接收消息批。

ReceiveBatchAsync(Int32, TimeSpan)

异步接收消息批。

ReceiveBatchAsync(IEnumerable<Int64>)

异步接收消息批。

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage>> ReceiveBatchAsync (System.Collections.Generic.IEnumerable<long> sequenceNumbers);
abstract member ReceiveBatchAsync : seq<int64> -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>>
override this.ReceiveBatchAsync : seq<int64> -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>>
Public Function ReceiveBatchAsync (sequenceNumbers As IEnumerable(Of Long)) As Task(Of IEnumerable(Of BrokeredMessage))

参数

sequenceNumbers
IEnumerable<Int64>

与批中的消息关联的序列号。

返回

异步操作。

适用于

ReceiveBatchAsync(Int32)

异步接收消息批。

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage>> ReceiveBatchAsync (int messageCount);
abstract member ReceiveBatchAsync : int -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>>
override this.ReceiveBatchAsync : int -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>>
Public Function ReceiveBatchAsync (messageCount As Integer) As Task(Of IEnumerable(Of BrokeredMessage))

参数

messageCount
Int32

要在批中返回的消息数。 由于这是一个近似值,因此返回的消息数少于或多于 messageCount 可能返回的消息数。

返回

异步操作。

适用于

ReceiveBatchAsync(Int32, TimeSpan)

异步接收消息批。

public System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage>> ReceiveBatchAsync (int messageCount, TimeSpan serverWaitTime);
abstract member ReceiveBatchAsync : int * TimeSpan -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>>
override this.ReceiveBatchAsync : int * TimeSpan -> System.Threading.Tasks.Task<seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>>
Public Function ReceiveBatchAsync (messageCount As Integer, serverWaitTime As TimeSpan) As Task(Of IEnumerable(Of BrokeredMessage))

参数

messageCount
Int32

要在批中返回的消息数。 由于这是一个近似值,因此返回的消息数少于或多于 messageCount 可能返回的消息数。

serverWaitTime
TimeSpan

服务器在超时之前等待消息批到达的时间跨度。

返回

异步操作。

适用于