Bug 1086810

Summary: '#' character handling in the address
Product: Red Hat Enterprise MRG Reporter: Petr Matousek <pematous>
Component: qpid-javaAssignee: messaging-bugs <messaging-bugs>
Status: NEW --- QA Contact: Messaging QE <messaging-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: DevelopmentCC: jross
Target Milestone: ---Keywords: Improvement
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1086813 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1086813    

Description Petr Matousek 2014-04-11 14:47:18 UTC
Description of problem:

According to documentation (MPR), over 0-10, the Address converts a node name starting with a '#' character by inserting a UUID, This work well for all supported clients except the JMS client.

Also, when the address string starts with '#' character the node shall be created (and removed on link close). Using JMS client the desired node is NOT created. Please see additional info for details.  

Version-Release number of selected component (if applicable):
qpid-java-*-0.22-6

How reproducible:
100%

Steps to Reproduce:
1. javac -cp  CLASSPATH orapache.qpid.example.Drain -f "#q;{create: always}"
2. list queues (ie.: with qpid-config)
3. queue '#q' is listed instead of '<uuid>#q'
4. see Additional info

Actual results:
When the node name starts with '#' character:
1. uuid is NOT inserted before the node name
2. the node is NOT created

Expected results:
When the node name starts with '#' character:
1. uuid is inserted before the node name
2. the node is created and removed after the link is closed

Additional info:

JMS client:

./run_example.sh orapache.qpid.example.Drain -f "#q"
Exception in thread "main" javax.jms.JMSException: Error registering consumer: org.apache.qpid.AMQException: The name '#q' supplied in the address doesn't resolve to an exchange or a queue

C++ client:

./drain -t 1 "#q" & qpid-config queues; sleep 1; qpid-config queues
[1] 28029
Queue Name                                Attributes
=================================================================
441d5b59-4f9f-4eb5-9a34-fe81b0f8efab:0.0  auto-del excl 
ea0b1fd1-ee6f-440f-82bd-016b049822db#q    auto-del excl 
[1]+  Done                    ./qc2_drain -t 1 "#q"
Queue Name                                Attributes
=================================================================
78abdff1-c255-441d-98d1-3277fe4cbc17:0.0  auto-del excl