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 11:53:37 GMT
On Wed, Feb 13, 2013 at 10:46 PM, yxzhao <> wrote:
> Hi All,
> We have a route which gets messages from an MQ queue. We expect messages in
> bytes, but always receive java.lang.String even when we set our route as
> below:
>  <route id="queue-incoming">
>          <from
> uri="jmsComponent:queue:test?jmsMessageType=Bytes&amp;disableReplyTo=true"/>
>          <to uri="bean:imcomingMsgProcessor?method=saveMsg"/>
>  </route>
> Does anybody have a clue what we did wrong or missing?

jmsMessageType is only when Camel sends a message to a queue, where
you can force Camel to send the message as the type you want.

When you receive from a queue, then you receive the message in the
type that it was sent (eg the JMS types).
So in your case, someone send the message as a javax.jms.TextMessage

> Thanks in advance for any help or hints on this issue.
> --
> 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