示例#1
0
 private void ISer_ConnectionShutdown(object sender, RabbitMQ.Client.ShutdownEventArgs e)
 {
     if (sender != null)
     {
         IService ISvr = sender as IService;
         PolicyTryConnect(ISvr);
     }
 }
示例#2
0
 private void Consumer_ConnectionLost(RabbitMQ.Client.IConnection connection,
                                      RabbitMQ.Client.ShutdownEventArgs reason)
 {
     Consumer.ConnectionLost -= Consumer_ConnectionLost;
     Log.Warning("Connection lost to RabbitMQ Server due to {0}", reason.Cause);
     try
     {
         Consumer.StartConsuming();
     }
     catch (Exception ex)
     {
         Log.Warning(ex, "Shutting down old connection to allow new connection to replace it");
     }
     InitializeQueueConnection();
     StartConsuming();
 }
示例#3
0
 public void HandleModelShutdown(object model, RabbitMQ.Client.ShutdownEventArgs reason)
 {
 }
 public ConnectionFailureException(RabbitMQ.Client.ShutdownEventArgs shutdownEventArgs)
     : base("Caused by a client shutdown, see ShutdownEventArgs property")
 {
     ShutdownEventArgs = shutdownEventArgs;
     CausedByShutdown  = true;
 }