예제 #1
0
        public void MoveToSubQueue(Type messageType, Message message)
        {
            var helper = new InputQueueHelper(bus);

            using (var queue = helper.GetQueue(messageType))
            {
                queue.MoveToSubQueue(SubQueueName, message);
            }
        }
예제 #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;
            }
        }