Example #1
0
        private static void Main(string[] args)
        {
            using (var channel = new QueueChannel("log queue"))
            {
                var consumer = channel.CreateConsumer();

                while (true)
                {
                    RecieveOrderInfo(consumer, channel);
                }
            }
        }
Example #2
0
        private static void Main(string[] args)
        {
            SessionFactory.Create();
            OrderRepository orderRepository = new OrderRepository();

            using (var channel = new QueueChannel("request queue"))
            {
                var consumer = channel.CreateConsumer();

                var processor = new OrderProcessor(channel, consumer, orderRepository);
                while (true)
                {
                    processor.Process();
                }
            }
        }