On 12/09/2009 09:25 PM, Jason Pellerin wrote:
I'd like to try out the new api (qpid.messaging) but I'm hung up on declaring and binding queues and exchanges. There doesn't seem to be a way, as far as I can tell, to do the equivalent of:session.queue_declare(queue=queue, ...) session.exchange_declare(exchange=exchange, type=exchange_type, ...) session.exchange_bind(queue=queue, exchange=exchange, routing_key=routing_key) I've tried various arguments to messaging.Connection().session().receiver() but as far as I can tell from the target address parsing and option use in qpid.driver, there's no way to say "I want to receive on queue Q on exchange E (and here's my routing key)."
If the exchange already exists then creating a receiver with an address of the form my-exchange/my-routing-key will cause messages sent to that exchange with a matching routing-key to be delivered to your receiver. A subscription queue will be created automatically.
If you want to create the exchange if it doesn't exist you can use 'my-exchange/my-routing-key; {create: always}'.
I see that qpid.brokertest is working around this by opening two connections, but that's not a very appealing solution, at least for my web-app-centric world. Am I missing something? Thanks, Jason Pellerin CONFIDENTIALITY NOTE The document(s) accompanying this e-mail transmission, if any, and the e-mail transmittal message containing information from Leapfrog Online Customer Acquisition, LLC is confidential or privileged. The information is intended to be for the use of the individual(s) or entity(ies) named on this e-mail transmission message. If you are not the intended recipient, be aware that any disclosure, copying, distribution or use of the contents of this e-mail is prohibited. If you have received this e-mail in error, please immediately delete this e-mail and notify us by telephone of the error. --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
--------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
