On 06/27/2011 12:49 PM, Jiri Krutil wrote:
Using the C++ messaging client (v0.7), is it possible to declare an
exchange by creating a Sender and closing it without ever sending a
message, assuming I use the right address with type:exchange and
create:always?

Yes, although the type should be 'topic'.

Similarly, is it possible to declare a queue and its bindings by
creating a Receiver and closing it without trying to receive a message?
The address has type:exchange, create:always and a list of bindings in
the x-bindings part.

The address the there should be 'queue'. The x-bindings should be declared in the node, not the link (else they will be unbound when the link, i.e. the receiver, is closed).

If the above is incorrect, can you please suggest another way which does
not force me to send/receive any messages?

It's not incorrect.

Personally, I dislike the approach (though it will work). It creates things as a side effect and isn't really the intended use case.

My preference is to send the broker special management messages to request creation of 'static' broker entities such as exchanges and shared queues. It allows a more explicit approach to broker management which I think is nicer. However that has only been possible on the broker since 0.10.



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

Reply via email to