public void MoveToSubQueue(Type messageType, Message message) { var helper = new InputQueueHelper(bus); using (var queue = helper.GetQueue(messageType)) { queue.MoveToSubQueue(SubQueueName, message); } }
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; } }