Bug 841493

Summary: java client does not support multi-byte characters (UTF-8) in address
Product: Red Hat Enterprise MRG Reporter: Leonid Zhaldybin <lzhaldyb>
Component: qpid-javaAssignee: messaging-bugs <messaging-bugs>
Status: NEW --- QA Contact: MRG Quality Engineering <mrgqe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.2CC: jross
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 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:

Description Leonid Zhaldybin 2012-07-19 07:25:45 UTC
Description of problem:
When trying to send a message to a queue containing multi-byte (UTF8) characters in its name, java client fails:

[root@lzhaldyb-rhel63x ~]# qpid-config add queue ščščřž
[root@lzhaldyb-rhel63x ~]# qpid-config queues
Queue Name                           Attributes
============================================================
qmfc-v2-hb-lzhaldyb-rhel63x.12144.1  auto-del excl --limit-policy=ring 
qmfc-v2-lzhaldyb-rhel63x.12144.1     auto-del excl 
qmfc-v2-ui-lzhaldyb-rhel63x.12144.1  auto-del excl --limit-policy=ring 
reply-lzhaldyb-rhel63x.12144.1       auto-del excl 
topic-lzhaldyb-rhel63x.12144.1       auto-del excl --limit-policy=ring 
ščščřž
[root@lzhaldyb-rhel63x ~]# java -cp $QPID_CLASSPATH -Dlog4j.configuration=example.log4j org.apache.qpid.example.Spout ščščřž
{}
Exception in thread "main" org.apache.qpid.messaging.util.LexError: unrecognized characters line:1,0:ščščřž
        at org.apache.qpid.messaging.util.Lexer.lex(Lexer.java:75)
        at org.apache.qpid.messaging.util.AddressParser.lex(AddressParser.java:63)
        at org.apache.qpid.messaging.util.AddressParser.wlex(AddressParser.java:69)
        at org.apache.qpid.messaging.util.AddressParser.<init>(AddressParser.java:236)
        at org.apache.qpid.messaging.Address.parse(Address.java:40)
        at org.apache.qpid.client.AMQDestination.createAddressFromString(AMQDestination.java:773)
        at org.apache.qpid.client.AMQDestination.parseDestinationString(AMQDestination.java:204)
        at org.apache.qpid.client.AMQDestination.<init>(AMQDestination.java:191)
        at org.apache.qpid.client.AMQAnyDestination.<init>(AMQAnyDestination.java:56)
        at org.apache.qpid.example.Spout.<init>(Spout.java:90)
        at org.apache.qpid.example.Spout.main(Spout.java:146)

Version-Release number of selected component (if applicable):
qpid-java-client-0.14-3.el6.noarch
qpid-java-common-0.14-3.el6.noarch
qpid-java-example-0.14-3.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1. Try to send a message to a queue with multi-byte characters in its name using java client.
2.
3.
  
Actual results:
java client fails to send a message.

Expected results:
java clients support addresses with UTF-8 characters.

Additional info: