public void MoveToSubQueue(Type messageType, Message message)
        {
            var helper = new InputQueueHelper(bus);

            using (var queue = helper.GetQueue(messageType))
            {
                queue.MoveToSubQueue(SubQueueName, message);
            }
        }
Example #2
0
        private Message GetFromQueue(Type messageType)
        {
            ((MsmqBus.BusEvents) bus.Events).OnListening(messageType);

            try
            {
                var helper = new InputQueueHelper(bus);

                using (var queue = helper.GetQueue(messageType))
                {
                    return queue.Peek(MessageQueue.InfiniteTimeout);
                }
            }
            catch (MessageQueueException)
            {
                return null;
            }
        }