[rabbitmq-discuss] Channel vs Connection shutdowns
Matthias Radestock
matthias at rabbitmq.com
Wed May 29 09:54:13 BST 2013
Adam,
On 28/05/13 15:10, Adam Morgan wrote:
> Is there a way to instigate a non-application-initiated shutdown (ie,
> cause an error that results in a shutdown) on the Channel object instead
> of the Connection?
Take a look at all the errors that are labelled as "channel" in the spec
at https://www.rabbitmq.com/amqp-0-9-1-reference.html#constants, and
then look at the various AMQP commands documented in the spec to see
which ones return such errors.
As you'll see from that, there are quite a few ways to trigger channel
errors. One of the easiest is probably to attempt to delete a
non-existing queue.
> For the record, the only non-application-initiated shutdowns I have
> caused were by attempting to publish to a non-existent exchange with an
> immediate flag=true.
Publishing to a non-existing exchange will trigger a 404 (not-found)
channel error, so that should have worked... except publishing with the
'immediate' flag is unsupported, triggering a 540 (not-implemented)
connection error instead.
Regards,
Matthias.
More information about the rabbitmq-discuss
mailing list