[rabbitmq-discuss] Check Queues Exist on Publish (and Read?)

Patrick Long pat at munkiisoft.com
Tue May 27 15:09:53 BST 2014


>>Since the OP is mostly concerned with making sure the basic.get works,
then it makes more sense to declare the queue passive=false.<<
 I am mostly concerned with BasicGet not causing a log entry.If the queue
is not there I don't care just don't error.

Are you guys saying I should always check the queue exist, Read and Write
and that it is how I check that is worth changing. The change should be
passing true for NoWait?

It does not look like the RabbitMQ .NET Client Library supports passing
nowait to QueueDeclare.

Pat


On 27 May 2014 14:28, Simon MacMullen <simon at rabbitmq.com> wrote:

> On 27/05/14 14:21, Michael Klishin wrote:
>
>>   On 27 May 2014 at 17:18:51, Patrick Long (pat at munkiisoft.com) wrote:
>>
>>> 1. Is there a way to tell RabbitMQ to chill out about queues not
>>>>
>>> being found?
>>>
>>
>> You can do that queue.declare with passive = true on a separate channel
>> or via HTTP API
>>
>
> Well, both passive=true and passive=false will assert that the queue
> exists, but passive=true will fail rather than create the queue if it is
> missing. Since the OP is mostly concerned with making sure the basic.get
> works, then it makes more sense to declare the queue passive=false.
>
> Ultimately the AMQPish way to do things is declare what you need
>
>  If you use basic.get, you need to perform declaration and so on once.
>> Every time you
>> declare a queue, it's a network roundtrip, so it will affect throughput.
>>
>
> Unless you issue the declare with nowait=true, in which case the client
> will just send the declare request and not wait for a response. If the
> queue already exists, this is almost free. Obviously if it doesn't you
> incur the cost of creating it, but you probably wanted that anyway :-)
>
> Cheers, Simon
>
>
> --
> Simon MacMullen
> RabbitMQ, Pivotal
>



-- 
Patrick Long - Munkiisoft Ltd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140527/3dd14f3e/attachment.html>


More information about the rabbitmq-discuss mailing list