Beispiel #1
0
        public TResponse Send <TRequest, TResponse>(TRequest request)
        {
            _log.Info($"Sending {request.SerializeToString()}");
            var queue = _mqClient.GetTempQueueName();

            _log.Info($"to queue {queue}");
            _mqClient.Publish(new Message <TRequest>(request)
            {
                ReplyTo = queue
            });

            var response = _mqClient.Get <TResponse>(queue);

            _log.Info($" got response {response.SerializeToString()}");
            _mqClient.Ack(response);
            return(response.GetBody());
        }
Beispiel #2
0
 public byte[] Get(string queueName, TimeSpan?timeOut)
 {
     return(_innerClient.Get(queueName, timeOut));
 }