[rabbitmq-discuss] Change in semantics of {exchange, queue}.{unbind, delete}

Matthias Radestock matthias at rabbitmq.com
Sun Jan 12 09:56:25 GMT 2014


On 12/01/14 01:17, Alan Antonuk wrote:
> It appears that the semantics of exchange.delete, exchange.unbind,
> queue.delete, and queue.unbind when the entity doesn't exist have
> changed: they used to throw a channel exception, now they do not.
> [...]
> I'm also kind of curious as to why this behavior was changed (which I
> would assume was for perf reasons).

The new behaviour is more useful and semantically consistent. AMQP 
generally has an idempotent assertion semantics, i.e. commands indicate 
what should be rather than what should happen. This is so that clients 
can operate independently on the shared space of resources, with each 
client simply asserting what it requires.

So declaring an exchange/queue/binding which already exists is perfectly 
fine. And deleting an exchange/queue/binding which doesn't exist should 
therefore be fine too.

You can get the old behaviour by prefixing the delete with a passive 



More information about the rabbitmq-discuss mailing list