[rabbitmq-discuss] ShutdownListener not triggered on server shutdown
0x6e6562 at gmail.com
Tue Nov 4 00:13:24 GMT 2008
On Mon, Nov 3, 2008 at 11:58 PM, Henric Larsson
<henric.larsson at gmail.com> wrote:
> I'm using the rabbit java client and rabbitmq server for some simple
> messaging and I can't seem to get the shutdown listener to work as expected.
> Basically, I'm attaching a shutdownlistener to the connection and then start
> sending messages every second. If I shutdown the server I would expect the
> shutdownlistener to be invoked at some point on the client but this never
> occurs. I only get an AlreadyClosedException when calling basicPublish on
> the channel.
I've just run your testcase against the latest default branch in our
tree and the shutdownCompleted() method appears to get called.
Although I am not aware of the specifics, I know that Hubert has down
a lot of work on shutdown negotiation in the Java client subsequent to
the 1.4.0 release, so he *may* have encountered this scenario, but
I'll let him comment on that.
So your short term solution would be to get a copy of the latest
source and try that.
More information about the rabbitmq-discuss