Example #1
0
        public void Send <T>(T msg, string routeKey)
        {
            RefreshQueues();

            var matchingQueues = MessageExchangeDeclaration.BindMessageToQueues(routeKey, _exchangeType, _queues);

            foreach (var q in matchingQueues)
            {
                using (var outbox = new MemoryMappedTransferOutbox(q))
                {
                    outbox.Enqueue(new MessageQueueEnvelope(msg));
                    outbox.Send();
                }
            }
        }
Example #2
0
 internal void Reenqueue(MessageQueueEnvelope messageQueue)
 {
     _req.Enqueue(messageQueue);
     _req.Send();
 }