public RabbitMqPublisher(ILogger <RabbitMqPublisher> logger, IConfiguration configuration)
        {
            _logger = logger;
            IConnection conn = new RabbitMqConnectionFactory(_logger, configuration).CreateConnection();

            _channel = new RabbitMqChannelFactory(_logger).CreateChannel(conn);
        }
 public RabbitMqConsumer(ILogger <RabbitMqConsumer> logger, IConfiguration configuration)
 {
     _logger            = logger;
     _connectionFactory = new RabbitMqConnectionFactory(_logger, configuration);
     _channelFactory    = new  RabbitMqChannelFactory(logger);
 }