[rabbitmq-discuss] Exceptions in c# client library

Matthias Radestock matthias at lshift.net
Tue Dec 16 21:40:31 GMT 2008


Alister,

Alister Morton wrote:
> AFAICT there aren't any hooks on the IConnection or IModel to enable
the client process to handle these sort of exceptions. If I add a
handler with
> 
> conn.CallbackException += new
RabbitMQ.Client.Events.CallbackExceptionEventHandler(conn_CallbackException);
> or model.CallbackException += new
RabbitMQ.Client.Events.CallbackExceptionEventHandler(model_CallbackException);
> 
> they don't get called when these sort of errors occur.

CallBackException events are "signalled when an exception occurs in a 
callback invoked by the connection/model.".

What you want is an event that is raised when the connection or 
model/channel is destroyed. These are IConnection.ConnectionShutdown and 
IModel.ModelShutdown, respectively.


Regards,

Matthias.




More information about the rabbitmq-discuss mailing list