private void ISer_ConnectionShutdown(object sender, RabbitMQ.Client.ShutdownEventArgs e) { if (sender != null) { IService ISvr = sender as IService; PolicyTryConnect(ISvr); } }
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(); }
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; }