You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by retep <Pe...@alfa.de> on 2009/03/25 16:24:57 UTC

Topic selector with non ASCII characters

Hi,

we are using topic messages to sent messages from one user to another. Our
program subscribe a durable consumer with selector "UserName='<user>'" and
sent a message with the property "UserName" and value "<user>".

All works fine, when <user> contains only ASCII characters. When <user>
contains non ASCII characters like äöüßé, the message is not sent to the
consumer.

I have looked in the data files and everything looks fine.

We are using ActiveMQ 5.2.


Thank you for help,

Peter

-- 
View this message in context: http://www.nabble.com/Topic-selector-with-non-ASCII-characters-tp22704013p22704013.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Topic selector with non ASCII characters

Posted by Bruce Snyder <br...@gmail.com>.
On Thu, Mar 26, 2009 at 9:10 AM, retep <Pe...@alfa.de> wrote:
>
> Ok, i have found, that the problem is in the ActiveMQ-C++-Client. The client
> do not handle the encoding correct. I have correct it. Now it's works fine.

Care to submit a patch for the correction so that it gets into the
next ActiveMQ-CPP client release?

http://activemq.apache.org/contributing.html#Contributing-Submittingpatches

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.apache.org/
Apache Camel - http://camel.apache.org/
Apache ServiceMix - http://servicemix.apache.org/

Blog: http://bruceblog.org/

Re: Topic selector with non ASCII characters

Posted by retep <Pe...@alfa.de>.
Ok, i have found, that the problem is in the ActiveMQ-C++-Client. The client
do not handle the encoding correct. I have correct it. Now it's works fine.

Peter


retep wrote:
> 
> Hi,
> 
> I'am using UTF8 encoding for the selector and the property value.
> 
> Peter
> 
> 
> bsnyder wrote:
>> 
>> On Wed, Mar 25, 2009 at 9:24 AM, retep <Pe...@alfa.de> wrote:
>>>
>>> Hi,
>>>
>>> we are using topic messages to sent messages from one user to another.
>>> Our
>>> program subscribe a durable consumer with selector "UserName='<user>'"
>>> and
>>> sent a message with the property "UserName" and value "<user>".
>>>
>>> All works fine, when <user> contains only ASCII characters. When <user>
>>> contains non ASCII characters like äöüßé, the message is not sent to the
>>> consumer.
>>>
>>> I have looked in the data files and everything looks fine.
>>>
>>> We are using ActiveMQ 5.2.
>> 
>> According to the JMS spec, section 3.8.1.1 Message Selector Syntax:
>> 
>> A string literal is enclosed in single quotes, with an included single
>> quote
>> represented by doubled single quote; for example, ‘literal’ and
>> ‘literal’’s’.
>> Like Java String literals, these use the Unicode character encoding.
>> 
>> Just an idea, have you tried using the Unicode characters instead of
>> ASCII?
>> 
>> Bruce
>> -- 
>> perl -e 'print
>> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
>> );'
>> 
>> Apache ActiveMQ - http://activemq.apache.org/
>> Apache Camel - http://camel.apache.org/
>> Apache ServiceMix - http://servicemix.apache.org/
>> 
>> Blog: http://bruceblog.org/
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Topic-selector-with-non-ASCII-characters-tp22704013p22723971.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Topic selector with non ASCII characters

Posted by retep <Pe...@alfa.de>.
Hi,

I'am using UTF8 encoding for the selector and the property value.

Peter


bsnyder wrote:
> 
> On Wed, Mar 25, 2009 at 9:24 AM, retep <Pe...@alfa.de> wrote:
>>
>> Hi,
>>
>> we are using topic messages to sent messages from one user to another.
>> Our
>> program subscribe a durable consumer with selector "UserName='<user>'"
>> and
>> sent a message with the property "UserName" and value "<user>".
>>
>> All works fine, when <user> contains only ASCII characters. When <user>
>> contains non ASCII characters like äöüßé, the message is not sent to the
>> consumer.
>>
>> I have looked in the data files and everything looks fine.
>>
>> We are using ActiveMQ 5.2.
> 
> According to the JMS spec, section 3.8.1.1 Message Selector Syntax:
> 
> A string literal is enclosed in single quotes, with an included single
> quote
> represented by doubled single quote; for example, ‘literal’ and
> ‘literal’’s’.
> Like Java String literals, these use the Unicode character encoding.
> 
> Just an idea, have you tried using the Unicode characters instead of
> ASCII?
> 
> Bruce
> -- 
> perl -e 'print
> unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
> );'
> 
> Apache ActiveMQ - http://activemq.apache.org/
> Apache Camel - http://camel.apache.org/
> Apache ServiceMix - http://servicemix.apache.org/
> 
> Blog: http://bruceblog.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/Topic-selector-with-non-ASCII-characters-tp22704013p22717985.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Topic selector with non ASCII characters

Posted by Bruce Snyder <br...@gmail.com>.
On Wed, Mar 25, 2009 at 9:24 AM, retep <Pe...@alfa.de> wrote:
>
> Hi,
>
> we are using topic messages to sent messages from one user to another. Our
> program subscribe a durable consumer with selector "UserName='<user>'" and
> sent a message with the property "UserName" and value "<user>".
>
> All works fine, when <user> contains only ASCII characters. When <user>
> contains non ASCII characters like äöüßé, the message is not sent to the
> consumer.
>
> I have looked in the data files and everything looks fine.
>
> We are using ActiveMQ 5.2.

According to the JMS spec, section 3.8.1.1 Message Selector Syntax:

A string literal is enclosed in single quotes, with an included single quote
represented by doubled single quote; for example, ‘literal’ and ‘literal’’s’.
Like Java String literals, these use the Unicode character encoding.

Just an idea, have you tried using the Unicode characters instead of
ASCII?

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache ActiveMQ - http://activemq.apache.org/
Apache Camel - http://camel.apache.org/
Apache ServiceMix - http://servicemix.apache.org/

Blog: http://bruceblog.org/