public virtual IMessageQueue GetReplyQueue(Message message)
        {
            if (!(Pattern == MessagePattern.RequestResponse && Direction == Direction.Inbound))
            {
                throw new InvalidOperationException("Cannot get a reply queue except for inbound request-response");
            }

            return(MessageQueueFactory.CreateOutbound(message.ResponseAddress, MessagePattern.RequestResponse, true, this));
        }
        public virtual IMessageQueue GetResponseQueue()
        {
            if (!(Pattern == MessagePattern.RequestResponse && Direction == Direction.Outbound))
            {
                throw new InvalidOperationException("Cannot get a response queue except for outbound request-response");
            }

            var address = CreateResponseQueue();

            return(MessageQueueFactory.CreateInbound(address, MessagePattern.RequestResponse, true, this));
        }