peekBatch method Null safety

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

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

Important: This method is not supported by MQTT.

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