您现在访问的是微软AZURE全球版技术文档网站,若需要访问由世纪互联运营的MICROSOFT AZURE中国区技术文档网站,请访问 https://docs.azure.cn.

MessageReceiver.ReceiveBatch Method

Definition

Overloads

ReceiveBatch(IEnumerable<Int64>)

Receives a batch of messages.

ReceiveBatch(Int32)

Receives a batch of messages.

ReceiveBatch(Int32, TimeSpan)

Receives a batch of messages.

ReceiveBatch(IEnumerable<Int64>)

Receives a batch of messages.

public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> ReceiveBatch (System.Collections.Generic.IEnumerable<long> sequenceNumbers);
Parameters
sequenceNumbers
IEnumerable<Int64>

The sequence numbers.

Returns

A batch of messages.

Remarks

A Null can be returned by this API if operation exceeded the timeout specified, or the operations succeeded but the message with the requested sequenceNumber cannot be located.

ReceiveBatch(Int32)

Receives a batch of messages.

public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> ReceiveBatch (int messageCount);
Parameters
messageCount
Int32

The number of messages to return in the batch. As this is an approximation, fewer or more messages than messageCount may be returned.

Returns

A batch of messages.

Remarks

A Null can be return by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

ReceiveBatch(Int32, TimeSpan)

Receives a batch of messages.

public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> ReceiveBatch (int messageCount, TimeSpan serverWaitTime);
Parameters
messageCount
Int32

The number of messages to return in the batch. As this is an approximation, fewer or more messages than messageCount may be returned.

serverWaitTime
TimeSpan

The server wait time.

Returns

A batch of messages.

Remarks

A Null can be returned by this API if operation exceeded the timeout specified, or the operations succeeded but there are no more messages to be received.

Applies to