camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Always receive String Message even with jmsMessageType set to Bytes
Date Thu, 14 Feb 2013 15:43:43 GMT
On Thu, Feb 14, 2013 at 4:22 PM, yxzhao <> wrote:
> We can verify that if the MQ message is sent with MQMessage.format =
> MQConstants.MQFMT_STRING, then our route will receive text message.
> Otherwise, it will receive a byte array. Actually, the sending app uses the
> same write bytes method to put the message into the queue. The same message
> can be received as bytes when using MQMessage.readFully method.
> Also, we need to know the charset that camel/jms uses to convert the bytes
> into string to revert the text message back to bytes since we need to get
> the original binary values.

It is not Camel doing anything there. Camel uses the JMS Client to get the data.

Camel receives a javax.jms.Message which comes in different implementations.
So Camel check if instanceof TextMessage, then its a text. If
instanceof BytesMessages its a bytes message  etc.

Under the hood its the JMS client, and in your case IBM WebSphere
being the JMS client.

> Any suggestions?
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message