peekBatch abstract method

Future<List<MessageEnvelope?>> peekBatch(
  1. String? correlationId,
  2. int messageCount
)

Peeks multiple incoming messages from the queue without removing them. If there are no messages available in the queue it returns an empty list.

  • correlationId (optional) transaction id to trace execution through call chain.
  • messageCount a maximum number of messages to peek. Return Future that receives a list with messages Throws error.

Implementation

Future<List<MessageEnvelope?>> peekBatch(
    String? correlationId, int messageCount);