[rabbitmq-discuss] Is it error?

Alvaro Videla videlalvaro at gmail.com
Tue Feb 5 13:57:39 GMT 2013


I don't know what you are trying to do, but the idea behind the "declare"
methods is that you don't need to issue a "queue_declare" passive=true just
to see if the queue is there, if not then create it with another
queue_declare.

"queue_declare" won't do anything if the queue already exists, so you
shouldn't need to use it twice.


On Tue, Feb 5, 2013 at 2:52 PM, Тимур <mcsseifer at gmail.com> wrote:

> My client raise error on 404 error.
> I use passive mode for detect exists queue or not. And if it not exists
> then i try create it without passive. So, i realy cant do something like
> that:
>
> connection->channel_close(1);
> connecton->channel_open(1);
>
> because "Opening channel: server connection error 503, message:
> COMMAND_INVALID - second 'channel.open'"
>
> Instead this i reopen connect to server, but its not good way.
>
>
> 2013/2/5 Tim Watson <tim at rabbitmq.com>
>
>> On 4 Feb 2013, at 18:31, Тимур wrote:
>>
>> > I found strange behavior in some case. What i do:
>> >
>> > 1. Connect to server
>> > 2. Open channel with name is '1'
>>
>> Channel's don't have *name* property, so I'm not sure what you're talking
>> about here.
>>
>> > 3. Declare queue with passive = 1
>> >
>>
>> Does the queue already exist, or are you trying to create it here?
>>
>> > And after that i try declare queue with passive = 0 if i receive 404
>> error in third step. Receive error like 'Declare Exchange: Resource
>> temporary unavailable'. Is it actual behavior?
>>
>>
>> From
>> http://www.rabbitmq.com/amqp-0-9-1-reference.html#queue.declare.passive
>>
>> "bit passive
>>  If set, the server will reply with Declare-Ok if the queue already
>> exists with the same name, and raise an error if not."
>>
>> So you would end up with a channel error if the queue doesn't already
>> exit and will need to open a new channel. If that's the case, then it's
>> likely the behaviour you're seeing is consistent but the client error is
>> confusing. The 404 channel error means "The client attempted to work with a
>> server entity that does not exist".
>>
>> Cheers,
>> Tim
>> _______________________________________________
>> rabbitmq-discuss mailing list
>> rabbitmq-discuss at lists.rabbitmq.com
>> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130205/31ce6d4d/attachment.htm>


More information about the rabbitmq-discuss mailing list