[rabbitmq-discuss] PRECONDITION_FAILED question
ku3ia
demesg at gmail.com
Tue Nov 12 17:01:34 GMT 2013
Hi!
I'm writing unit tests for my C# RabbitMq component over RabbitMq client
library.
My code like this:
public void RemoveExchange(string name)
{
_channel.ExchangeDelete(name, true);
}
When I'm using it in my units, like
try
{
RemoveExchange("x-declared-before-exchange-and-binded-to-any-queue");
}
catch (Exception e)
{
/* here I get:
The AMQP operation was interrupted: AMQP close-reason, initiated by Peer,
code=406, text="PRECONDITION_FAILED - exchange 'exchange-name' in vhost '/'
in use", classId=40, methodId=20, cause=
*/
}
It is ok, because my exchange is in use. But when I tried later to use
_channel.QueueUnbind command I get the same exception.
Please advise, how to avoid this. Thanks.
--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/PRECONDITION-FAILED-question-tp31381.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
More information about the rabbitmq-discuss
mailing list