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 <[email protected]> wrote: > 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 the server is initialized. > > Emmanuel Bourg > > > Le 17/05/2010 15:52, Rajith Attapattu a écrit : >> >> 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 : 'topic3'}, {exchange : 'amq.topic', key : 'topic4'} >> ] } } >> >> For more information on the addressing format, refer the following, >> http://people.apache.org/~jonathan/Programming-In-Apache-Qpid.html >> >> The above link is part of the svn maintained docs that will be part of >> the new website. >> >> Regards, >> >> Rajith > > --------------------------------------------------------------------- > Apache Qpid - AMQP Messaging Implementation > Project: http://qpid.apache.org > Use/Interact: mailto:[email protected] > > -- Regards, Rajith Attapattu Red Hat http://rajith.2rlabs.com/ --------------------------------------------------------------------- Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:[email protected]
