protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _receiver.Dispose();
                _receiver = null;
            }

            base.Dispose(disposing);
        }
 public ConsumeMessagesJob(
     ILogger logger,
     IExternalMessageBusReceiver receiver,
     IApplicationConfiguration<IMicroServicesCoreConfiguration> configuration,
     IMessageParserFactory messageParserFactory)
 {
     _logger = logger;
     _receiver = receiver;
     _configuration = configuration;
     _messageParserFactory = messageParserFactory;
 }