public void AddServices(IServiceCollection services)
        {
            var options = new RabbitMQOptions();

            _configure?.Invoke(options);
            services.AddSingleton(options);

            services.AddSingleton <IConsumerClientFactory, RabbitMQConsumerClientFactory>();
            services.AddTransient <IQueueExecutor, PublishQueueExecutor>();
        }
        public void AddServices(IServiceCollection services)
        {
            services.AddSingleton <CapMessageQueueMakerService>();

            var options = new RabbitMQOptions();

            _configure?.Invoke(options);
            services.AddSingleton(options);

            services.AddSingleton <IConsumerClientFactory, RabbitMQConsumerClientFactory>();
            services.AddSingleton <IConnectionChannelPool, ConnectionChannelPool>();
            services.AddSingleton <IPublishExecutor, RabbitMQPublishMessageSender>();
            services.AddSingleton <IPublishMessageSender, RabbitMQPublishMessageSender>();
        }