共用方式為


QueueClient.PeekBatch Method

Definition

Overloads

PeekBatch(Int32)

Peeks a batch of messages.

PeekBatch(Int64, Int32)

Peeks a batch of messages.

PeekBatch(Int32)

Peeks a batch of messages.

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

Parameters

messageCount
Int32

The number of messages.

Returns

A batch of messages peeked. Returns all properties and the message body.

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.

Applies to

PeekBatch(Int64, Int32)

Peeks a batch of messages.

public System.Collections.Generic.IEnumerable<Microsoft.ServiceBus.Messaging.BrokeredMessage> PeekBatch (long fromSequenceNumber, int messageCount);
abstract member PeekBatch : int64 * int -> seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>
override this.PeekBatch : int64 * int -> seq<Microsoft.ServiceBus.Messaging.BrokeredMessage>
Public Function PeekBatch (fromSequenceNumber As Long, messageCount As Integer) As IEnumerable(Of BrokeredMessage)

Parameters

fromSequenceNumber
Int64

The starting point from which to browse a batch of messages.

messageCount
Int32

The number of messages.

Returns

A batch of messages peeked.

Applies to