qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: How can I know queue existence?
Date Tue, 29 Sep 2009 12:50:51 GMT
On 09/29/2009 11:09 AM, ricardlf wrote:
> Hi!
> Maybe it's a solution for this paricular case. But I can imagine other
> situations where there would be necessary to know if a queue exists or
> not, for example, what if the consumer disconnects from the broker and
> the producer has still some messages to send? in this case, all those
> messages will fail, so, is there a method or function to know the
> existence of a queue?

In AMQP 0-10 you can use either queue-query or exchange-bound to 
determine the existence of a queue without destroying the session if it 
does not exist (queue-declare with the passive flag set will also detect 
presence, but if the queue doesn't exist the session used is destroyed).

In the c++ client this would involve e.g.

session.queueQuery(arg::queue="my-queue").getQueue() == "my-queue"



It would not be possible via JMS. You could also use QMF (Qpid 
Management Framework) to get this information (assuming you are using 
the c++ broker).

> Thank you very much!
> El mar, 29-09-2009 a las 02:11 -0700, Gordon Sim (via Nabble) escribió:
>> On 09/29/2009 09:34 AM, ricardlf wrote:
>>> Hi!
>>> I'm working on an application where each consumer has its own queue,
>> the
>>> producers wait until the queue of its consumer is created and then
>> they
>>> start to send message to its consumer (the producer knows the
>> consumer's
>>> queue name from the begining). How can I know when the queue is
>> created to
>>> make the producer start to send messages? I need to do this in Java
>> and C++
>>> because I'm wraiting producers in both languages.
>> My suggestion would be to have the consumer send (or broadcast) a
>> message when they are ready to receive messages.
>> ---------------------------------------------------------------------
>> Apache Qpid - AMQP Messaging Implementation
>> Project:      http://qpid.apache.org
>> Use/Interact: mailto:[hidden email]
>> ______________________________________________________________________
>> View message @
>> http://n2.nabble.com/How-can-I-know-queue-existence-tp3734626p3734825.html
>> To unsubscribe from How can I know queue existence?, click here.

Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org

View raw message