Description of problem: The session.createQueue and session.createTopic methods allows applications to create destination dynamically. The intended usage here is to pass in the queue or topic name. However It would be nice if this could be used as an extension point to allow an application to create destinations by passing in an address string. This allows applications to create more complex destinations at runtime, while still using standard JMS methods without having to resort to any Qpid specific code.
This is tracked in upstream via QPID-2736. Git commit URL. http://mrg1.lab.bos.redhat.com/cgit/qpid.git/commit/?id=aaba759634864e09845aeaff93fbe97458acfc36
Steps to test ================ 1. Pass in different address strings to session.createQueue and session.createTopic methods Ex Session ssn = con.createSession(false, Session.AUTO_ACKNOWLEDGE); Destination ssn.createQueue(<your-address-string>); // create producer and consumer and test message delivery is as expected. 2. You could simply pass in a Queue or Topic name or a complete address string. Ex. Destination queue = ssn.createQueue("sales"); String addr = "ADDR:amq.direct/x512; {create: receiver, " + "link : {name : 'MY.RESP.QUEUE', " + "x-declare : { auto-delete: true, exclusive: true, " + "'qpid.max_size': 1000, 'qpid.policy_type': ring } } }"; Destination queue = ssn.createQueue(addr); Destination topic = ssn.createTopic("use.news"); String addr = "ADDR:vehicles/bus; " + "{ " + "create: always, " + "node: " + "{" + "type: topic, " + "x-declare: " + "{ " + "type:direct, " + "auto-delete: true, " + "'qpid.msg_sequence': 1, " + "'qpid.ive': 1" + "}" + "}, " + "link: {name : my-topic, " + "x-bindings: [{exchange : 'vehicles', key : car}, " + "{exchange : 'vehicles', key : van}]" + "}" + "}"; Destination topic = ssn.createTopic(addr);
This functionality is present and works. But there are problems with certain parameters of destinations. I filled separate bz623198 for that validated on RHEL5.5/RHEL4 i386 / x86_64 packages: # rpm -qa | grep -E '(qpid|openais|rhm)' | sort -u openais-0.80.6-16.el5_5.2 openais-devel-0.80.6-16.el5_5.2 python-qpid-0.7.946106-11.el5 qpid-cpp-client-0.7.946106-11.el5 qpid-cpp-client-devel-0.7.946106-11.el5 qpid-cpp-client-devel-docs-0.7.946106-11.el5 qpid-cpp-client-ssl-0.7.946106-11.el5 qpid-cpp-mrg-debuginfo-0.7.946106-8.el5 qpid-cpp-server-0.7.946106-11.el5 qpid-cpp-server-cluster-0.7.946106-11.el5 qpid-cpp-server-devel-0.7.946106-11.el5 qpid-cpp-server-ssl-0.7.946106-11.el5 qpid-cpp-server-store-0.7.946106-11.el5 qpid-cpp-server-xml-0.7.946106-11.el5 qpid-java-client-0.7.946106-7.el5 qpid-java-common-0.7.946106-7.el5 qpid-tools-0.7.946106-8.el5 rhm-docs-0.7.946106-4.el5 rh-tests-distribution-MRG-Messaging-qpid_common-1.6-52 ->VERIFIED