public ProducerCompoment()
 {
     RabbitMqFactory.Start();
     RabbitMqFactory.GetChannel(ConfigHelper.QueueId);
     this.tr           = new Timer();
     this.tr.Interval  = ConfigHelper.ProducerInterval * 1000;
     this.tr.AutoReset = true;
     this.tr.Elapsed  += TimerElapsed;
 }
        public ConsumerCompoment()
        {
            RabbitMqFactory.Start();

            var consumer = new RabbitMqConsumer(
                ConfigHelper.SubQueueNames,
                new PubSubDispatcher <RabbitMqEventStream>(AutoFacConfig.Container),
                ConfigHelper.QueueId);

            consumer.Register();
        }