Bug 616457 - Allow session.createQueue and session.createTopic methods to accept an address string
Allow session.createQueue and session.createTopic methods to accept an addres...
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
Development
All Linux
high Severity high
: 1.3
: ---
Assigned To: Rajith Attapattu
Jeff Needle
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-20 10:07 EDT by Rajith Attapattu
Modified: 2010-10-20 09:53 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-10-20 07:30:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Rajith Attapattu 2010-07-20 10:07:05 EDT
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.
Comment 1 Rajith Attapattu 2010-07-29 09:19:35 EDT
This is tracked in upstream via QPID-2736.

Git commit URL.
http://mrg1.lab.bos.redhat.com/cgit/qpid.git/commit/?id=aaba759634864e09845aeaff93fbe97458acfc36
Comment 2 Rajith Attapattu 2010-07-29 09:34:40 EDT
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);
Comment 3 Jiri Kolar 2010-08-11 11:10:31 EDT
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

Note You need to log in before you can comment on or make changes to this bug.