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

Ovidiu Deac ovidiudeac at gmail.com
Thu Nov 25 00:16:48 GMT 2010


Hi again,

I'm back with more info. Yes, the queue is still there.

I've got the chance to do some cleanup of the code  and some debugging
and it seems that I get an exception when I try delete an exchange
that doesn't exist and then all the following operations throw the
same exception, even if they try to delete queues that does exist.

The following code reproduces the problem:

IModel _channel;
//....set up _channel

            System.Console.WriteLine("deleting the exchange...");
            try
            {
                _channel.ExchangeDelete("x",false, false);
            } catch(Exception ex)
            {
                System.Console.WriteLine(ex.Message);
            }

            System.Console.WriteLine("deleting the queue...");

            try
            {
                _channel.QueueDelete("q", false, false, false);
            } catch(Exception ex)
            {
                        System.Console.WriteLine(ex.Message);
            }

Running this code when the exchange x DOESN'T exist and the queue q
DOES exist gives me the following output:

deleting the exchange...
The AMQP operation was interrupted: AMQP close-reason, initiated by
Peer, code=404, text="NOT_FOUND - no exchange 'x' in vhost '/'",
classId=40, methodId=20, cause=
deleting the queue...
The AMQP operation was interrupted: AMQP close-reason, initiated by
Peer, code=404, text="NOT_FOUND - no exchange 'x' in vhost '/'",
classId=40, methodId=20, cause=


So it seems that one error on the channel doesn't allow me to do any
other operations using that channel. Is there any possibility to reuse
the channel?

Thanks,
Ovidiu

On Fri, Nov 19, 2010 at 2:39 PM, Matthias Radestock
<matthias at rabbitmq.com> wrote:
> Ovidiu,
>
> On 19/11/10 10:52, Ovidiu Deac wrote:
>>
>> Thanks for the answer. I don't get any errors. At least I don't see any.
>
> So what *are* you seeing? Does the QueueDelete call succeed but the queue is
> still there? That can only happen if the queue gets redeclared by something
> else.
>
>
> Matthias.
>


More information about the rabbitmq-discuss mailing list