Well, that was a lot since this question was asked, but now you have a few events available:
m_connection.ConnectionInterruptedListener += new ConnectionInterruptedListener(OnConnectionInterruptedListener);
m_connection.ConnectionResumedListener += new ConnectionResumedListener(OnConnectionResumedListener);
m_connection.ExceptionListener += new ExceptionListener(OnExceptionListener);
where m_connection is an IConnection object.
With these three events, you can find when your broker is down (among other useful information, for example, when it resumes a connection or when it encounters an exception)
Note. If you are in the transition mode to another resource, these exceptions will be swallowed by the transshipment transport layer and automatically processed along with them. Therefore, you will not receive any of these events.
source
share