On 07/03/2011 09:04 AM, Jiri Krutil wrote:
Using the C++ messaging client, I would like to declare a binding from
exchange E to queue Q without declaring the exchange or the queue;
assuming both already exist. (I want to avoid their declaration because
I don't know all their attributes, so in case they don't exist, I want
to get an error.)

Is this perhaps possible by creating a Sender to an exchange that always
exists (say amq.direct) and specifying my binding between E and Q in the
Address (in the x-bindings list under node)?

Yes, but the x-bindings should then appear in the link, not the node. The node bindings are evaluated only if the node needs to be created. The link bindings are evaluated whenever a 'link' to or from the node, i.e. a sender or receiver, is created.

E.g. Assuming an exchange my-exchange and queue my-queue (which were separately configured or pre-exist), I can create a sender to:

my-exchange/my-key; {link:{x-bindings:[{exchange:my-exchange, queue:my-queue, key:my-key}]}}

which on creation will result in the binding being created. Note however that the binding will be destroyed when the sender is closed.

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

Reply via email to