TopicClient.PeekBatch 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
PeekBatch(Int32) |
Peeks a BrokeredMessage from current queue/topic. |
PeekBatch(Int64, Int32) |
PeekBatch(Int32)
Peeks a BrokeredMessage from current queue/topic.
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 maximum number of messages to peek.
Returns
return a list of peeked BrokeredMessages. An empty list is returned if peek operation cannot obtain the message within OperationTimeout.
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)
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
- messageCount
- Int32