[rabbitmq-discuss] dealing with a closing connection

Steve Jenson stevej at gmail.com
Wed Feb 6 19:23:22 GMT 2008


On Feb 6, 2008 10:56 AM, Matthias Radestock <matthias at lshift.net> wrote:
> Steve,
>
> Steve Jenson wrote:
>
> > Connection and Channel have no method for determining whether they are
> > still open that I can tell, unfortunately.
>
> Ah yes, I forgot those methods aren't in the Connection/Channel
> interfaces (as they are for the .Net client). You can find them in the
> implementation classes AMQConnection and AMQChannel though.
>
> This is an area we are planning to revise in a future release, probably
> by following the example of the .Net client.

I look forward to trying it out.

> > I'm using basicConsume and see no exceptions when the connection is
> > closed, my consumer is simply never called again.
>
> You should be able to override Consumer.handleShutdownSignal(String,
> ShutdownSignalException), which ought to get called when the connection
> or channel are shut down.

That's perfect, thank you. I will give that a try.

Steve




More information about the rabbitmq-discuss mailing list