peekBatch method Null safety

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

PeekBatch method are peeks multiple incoming messages from the _queue without removing them. If there are no messages available in the _queue it returns an empty list. Parameters:

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