本文整理汇总了C#中RabbitMQ.Client.ShutdownEventArgs.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ShutdownEventArgs.ToString方法的具体用法?C# ShutdownEventArgs.ToString怎么用?C# ShutdownEventArgs.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RabbitMQ.Client.ShutdownEventArgs
的用法示例。
在下文中一共展示了ShutdownEventArgs.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OutboundChannel_ModelShutdown
/// <summary>
/// For example Model can be shut-down when we fuck up consumer
/// ACK non existing deliverTag, ACK twice the same delivery tag, unbind queue that was no bound
/// </summary>
/// <param name="model"></param>
/// <param name="reason"></param>
protected virtual void OutboundChannel_ModelShutdown( IModel model, ShutdownEventArgs reason )
{
this.Tracer.TraceEvent ( System.Diagnostics.TraceEventType.Error, 0, "[{0}] channel shutdow {1} reason {2} ", this, model, reason.ToString () );
//TODO:react depending on the reason: reconnect or discharge all pending RPC requests
}
示例2: HandleMainLoopException
public void HandleMainLoopException(ShutdownEventArgs reason)
{
if (!SetCloseReason(reason))
{
LogCloseError("Unexpected Main Loop Exception while closing: "
+ reason.ToString(), null);
return;
}
OnShutdown();
LogCloseError("Unexpected connection closure: " + reason.ToString(), null);
}