setupReplyQueue method

Future<void> setupReplyQueue()

Implementation

Future<void> setupReplyQueue() async {
  if (_replyChannel != null) {
    throw Exception('Reply Queue already initialized.');
  }
  _replyChannel = await _brokerService.openChannel();
  _replyQueue =
      await _replyChannel!.queue('', durable: false, autoDelete: true);
  final consumer = await _replyQueue!.consume(noAck: false);
  consumer.listen(_onReplyEvent);
}