[rabbitmq-discuss] .Net Cilent/1.8.0: IModel.QueueDelete not working?

Simon MacMullen simon at rabbitmq.com
Fri Nov 26 08:42:35 GMT 2010


On 26/11/2010 8:19AM, Ovidiu Deac wrote:
> On Thu, Nov 25, 2010 at 1:11 PM, David Wragg<david at rabbitmq.com>  wrote:
>> In AMQP, the broker signals channel-level errors as part of closing the
>> channel.  So there is no way to reuse a channel after an error.  You
>> will need to open a new channel for further operations.
>
> I see. Is this a bug or a feature?

That's an interesting question. Certainly it annoys a whole bunch of 
people. But there are reasons.

The spec states that it's done this way to "avoid ambiguous states after 
errors", and there's some truth to this, although with some effort I'm 
sure an unambiguous set of post-error states could be defined.

The more real concern for me is one of reliability. If you're aiming to 
write a reliable messaging system, you'll have to plan for connections 
(and hence channels) going away unexpectedly anyway - with the best will 
in the world machines crash and people trip over network cables. And if 
you're doing that anyway then treating programming / configuration 
errors in a similar way makes at least some degree of sense.

To come back to your use case - if you're writing automated tests and 
need to clean up when you're finished, try declaring your exchanges 
autodelete. They will then go when the last queue unbinds from them. And 
then either declare queues autodelete - they'll go when the last 
consumer disconnects, or exclusive - they'll go when the creating 
connection goes. You shouldn't have to explicitly delete stuff at all.

Cheers, Simon


More information about the rabbitmq-discuss mailing list