[rabbitmq-discuss] AlreadyClosedException always sets hardError and initiatedByApplication to true

Steve Powell steve at rabbitmq.com
Tue Oct 22 11:42:17 BST 2013


You are right: I have reproduced some of this.  Here is what I found in my small test:

Cancelling an unknown consumer doesn't appear to close the channel (!) (channel.isOpen() is true).  It throws an IOException("Unknown consumerTag").
Explicitly closing the channel and then trying the same channel.basicCancel() call doesn't appear to close the connection, either! Same IOException.
Issuing a 'real work' call after closing the channel, like channel.basicConsume(), throws an AlreadyClosedException, claiming that the connection is closed, but conn.isOpen() still returns true.

There might be a number of bugs here. But I think there is only one: the connection ought to be closed when trying to use a Channel that doesn't exist.  The other 'anomalies' could be working as designed: if no protocol violations are involved in the action, the Channel can remain intact.

Steve Powell  [Cell: +44-7815-838-558] [RabbitMQ, Pivotal]
“L’enfer, c’est les autres.” Sartre

On 21 Oct 2013, at 21:37, Jonathan Halterman <jhalterman at gmail.com> wrote:

> What Steve mentioned above is that subsequent attempts to use the closed channel are hard errors that close the connection. This is what I haven't seen.
> 
> 
> On Mon, Oct 21, 2013 at 1:26 PM, Michael Klishin <mklishin at gopivotal.com> wrote:
> On 22 Oct 2013, at 00:17, Jonathan Halterman <jhalterman at gmail.com> wrote:
> 
> > After declaring a consumer on a non-existent queue several times, the connection is still in tact even though the AlreadyClosedException indicates a connection closure
> 
> Consuming from a non-existent queue should result in a channel exception
> which closes the channel, not the connection.
> 
> MK
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
> 
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20131022/2c3af60f/attachment.htm>


More information about the rabbitmq-discuss mailing list