Re: Multiple topics per queue with the JMS API

2010-05-19 Thread Emmanuel Bourg
Le 17/05/2010 19:33, Rajith Attapattu a écrit : In the future we may have a Java messaging API that is similar to the new C++ and Python API. And then build our JMS layer as a thin layer on top of it. Such a messaging API for Java would be really great. I don't mind if the API is unstable as

Re: Multiple topics per queue with the JMS API

2010-05-19 Thread Emmanuel Bourg
Le 17/05/2010 19:13, Martin Ritchie a écrit : Emmanuel, If you are looking to perform the bind/unbind to an existing queue then there is a bindQueue method on AMQSession however I was just looking at this and noticed there is no unbind. A simple thing to expose, but without a clear approach on

Re: Multiple topics per queue with the JMS API

2010-05-17 Thread Rajith Attapattu
Hi Emmanuel, It can be done easily using the new addressing format. For example you could use the following in the jndi.properties file. destination.myTopic = ADDR:amq.topic/topic1; { create: always, node: { x-bindings: [ {exchange : 'amq.topic', key : 'topic2'}, {exchange : 'amq.topic', key :

Re: Multiple topics per queue with the JMS API

2010-05-17 Thread Emmanuel Bourg
Thank you Rajith, I wasn't aware of this declarative form. Is there a way to do the same thing programmatically? In my use case the topics are bound/unbound dynamically over the lifetime of the application. That means I can't declare them statically in a properties file when the connection to

Re: Multiple topics per queue with the JMS API

2010-05-17 Thread Rajith Attapattu
You could use session.createTopic(address-string) or session.createQueue(address-string) and pass in the above string. Let me know if you have any further questions or if you run into any issues/bugs. Regards, Rajith On Mon, May 17, 2010 at 10:25 AM, Emmanuel Bourg ebo...@apache.org wrote:

Re: Multiple topics per queue with the JMS API

2010-05-17 Thread Martin Ritchie
Emmanuel, If you are looking to perform the bind/unbind to an existing queue then there is a bindQueue method on AMQSession however I was just looking at this and noticed there is no unbind. A simple thing to expose, but without a clear approach on exposing AMQP functionality in the

Re: Multiple topics per queue with the JMS API

2010-05-17 Thread Rajith Attapattu
I'd actually stay away from using any non standard JMS methods. The new addressing syntax provides an easy way to use AMQP functionality while sticking to the pure JMS methods. Infact it exposes more protocol features than any non standard method in AMQSession.java The addressing syntax will work

Multiple topics per queue with the JMS API

2010-05-16 Thread Emmanuel Bourg
I started using Qpid through the client API in org.apache.qpid.transport because it looked simple and flexible. However Rajith pointed out that this API was not supported, and with the removal of the examples using this API I feel the pressure to switch to the JMS API. Unfortunately I haven't