public MediatorHandler(IMediator mediator, IQueueableService queueableService, IConfiguration configuration, IHost host)
 {
     _mediator          = mediator ?? throw new ArgumentNullException(nameof(mediator));
     _queueableService  = queueableService ?? throw new ArgumentNullException(nameof(queueableService));
     _connectionFactory = new ConnectionFactory()
     {
         Uri = new Uri(configuration["rabbitmq:uri"])
     };
     _host = host ?? throw new ArgumentNullException(nameof(host));
 }
 public QueueHostedService(IQueueableService queueableService, IConfiguration configuration, IHost host)
 {
     _queueableService = queueableService ?? throw new ArgumentNullException(nameof(queueableService));
     _host             = host ?? throw new ArgumentNullException(nameof(host));
     _configuration    = configuration ?? throw new ArgumentNullException(nameof(configuration));
 }