示例#1
0
 void Connection_ConnectionShutdown(object source, ShutdownEventArgs reason)
 {
     consumer.ConnectionLost -= Connection_ConnectionShutdown;
     log.Debug("CarService: Connection lost to RabbitMQ Server due to {0}", reason.Cause);
     try
     {
         consumer.StopConsuming();
     }
     catch (Exception ex)
     {
         log.Warning(ex, "CarService: Shutting down old connection to allow new connection to replace it");
     }
     InitializeQueueConnection();
     ProcessingService.StartConsumer();
 }