/// <summary>
 /// Creates the consumer.
 /// </summary>
 /// <param name="accessor">The accessor.</param>
 /// <returns>The consumer.</returns>
 /// <remarks></remarks>
 private BlockingQueueConsumer CreateConsumer(RabbitAccessor accessor)
 {
     var consumer = new BlockingQueueConsumer(accessor.ConnectionFactory, new ActiveObjectCounter<BlockingQueueConsumer>(), AcknowledgeModeUtils.AcknowledgeMode.AUTO, true, 1, 0, queue.Name);
     consumer.Start();
     return consumer;
 }
        /// <summary>Creates the consumer.</summary>
        /// <param name="accessor">The accessor.</param>
        /// <returns>The consumer.</returns>
        private BlockingQueueConsumer CreateConsumer(RabbitAccessor accessor)
        {
            var consumer = new BlockingQueueConsumer(accessor.ConnectionFactory, new DefaultMessagePropertiesConverter(), new ActiveObjectCounter<BlockingQueueConsumer>(), AcknowledgeModeUtils.AcknowledgeMode.Auto, true, 1, queue.Name);
            consumer.Start();

            // wait for consumeOk...
            var n = 0;
            while (n++ < 100)
            {
                if (consumer.ConsumerTag == null)
                {
                    try
                    {
                        Thread.Sleep(100);
                    }
                    catch (ThreadInterruptedException e)
                    {
                        Thread.CurrentThread.Interrupt();
                        break;
                    }
                }
            }

            return consumer;
        }