On 09/30/2011 06:37 AM, surya prakash wrote:
In qpid::messaging API i didn't found queue declare things ,so that i moved
to qpid::client API

For creating queues you have a number of options to chose from depending on the different use cases.

(1) For pub-sub subscriptions, the library will take care of the declare and bind for you. So if you wish to get all messages matching a particular key - say my-key, sent to a particular exchange - say my-exchange - you simply create a receiver with address 'my-exchange/my-key'. (You can use the same address for senders of course).

(2) To create a response queue in a request-response pattern, the address options allow you to have the queue created on demand when opening the receiver (or indeed a sender, though less obviously useful in this particular pattern). This approach also lets you control the underlying declare (in the case of AMQP 0-10) E.g. you can create a receiver for the address 'my-queue; {create: always, node:{x-declare:{auto-delete:True}}}'

(3) You can use the qpid-config tool to create exchanges, queues and bindings statically, separate from your application logic. This is often a good idea.

(4) The tools as above use a message-based protocol - QMF - which you can also use directly (or through a separate QMF API). This is an area that needs better documentation but the following mail should provide sufficient pointers should this be appropriate to your needs: http://apache-qpid-users.2158936.n2.nabble.com/Delete-queue-exchange-binding-from-C-client-tp6472921p6473491.html

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to