activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Tully <>
Subject Re: Character encoding problem of the messages in queue
Date Tue, 08 Mar 2011 11:03:25 GMT
Text is encoded in utf-8, your call to getText() below is the
unmarshaled state as the original message is copied on send.
see the source here:

If you need utf-16, you will need to use a bytes message.

On 7 March 2011 16:46, RuralHunter <> wrote:
> Hi, I'm using Activemq 5.4.2 on Ubuntu server.
> I put text message with java by these codes:
> TextMessage message = session.createTextMessage(myText);
>        producer.send(message);
>        myLogger.finest("Sent message:");
>        myLogger.finest(message.getText());
> "myText" contains some Chinese characters. and I can see characters are
> correct in the log output above. But when I get the message from either
> another java program or by the web admin console, I can see the Chinese
> characters become "????". I guess some character encoding transformation
> happened when the messages put into the queue. What should I do to make the
> Chinese characters correct in the queue? Is there a charset/encoding
> parameter I can set for the broker or queue or maybe the JVM?
> btw, I used to use 5.4.x(some old version) before on windows and didn't see
> this problem.
> --
> View this message in context:
> Sent from the ActiveMQ - User mailing list archive at


View raw message