On Wed, Feb 13, 2013 at 10:46 PM, yxzhao <yxz...@stonewain.com> 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&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: > http://camel.465427.n5.nabble.com/Always-receive-String-Message-even-with-jmsMessageType-set-to-Bytes-tp5727563.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- Red Hat, Inc. FuseSource is now part of Red Hat Email: cib...@redhat.com Web: http://fusesource.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen