peek method

  1. @override
Future<MessageEnvelope> peek(
  1. String? correlationId
)

Peeks a single incoming message from the queue without removing it. If there are no messages available in the queue it returns null. Important: This method are not supported in this release! Parameters:

  • correlationId (optional) transaction id to trace execution through call chain. Return Future that recive a message Throws error

Implementation

@override
Future<MessageEnvelope> peek(String? correlationId) async {
  // _checkOpened(correlationId);

  // var envelope = _mqChanel.get(_queue, false);
  // var message = _toMessage(envelope);
  // if (message != null) {
  //   logger.trace(
  //       message.correlation_id, 'Peeked message %s on %s', [message, name]);
  // }
  // return message;

  throw Exception('Method "peek" are not supported!');
}