You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ellen <YL...@statestreet.com> on 2012/02/16 04:48:30 UTC

Re: Convert jms message from textmessage to bytemessage

Hi there!

I'm new to Camel and we have to use Camel 2.6. 
I have a simple route which receives BytesMessage and needs to send to
external system as TextMessage. I have tried set jmsMessage=Text on the
endpoint to the external system, but the external system still receives
BytesMessage. Dose anyone know if this is a known issue with Camel 2.6? Is
there is a workaround?

Any help is appreciated!

- Ellen

--
View this message in context: http://camel.465427.n5.nabble.com/Convert-jms-message-from-textmessage-to-bytemessage-tp4895362p5488418.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Convert jms message from textmessage to bytemessage

Posted by "Preben.Asmussen" <pr...@dr.dk>.
Hi

There was a bug i 2.8.1 regarding converting from text to bytemessage. This
might also be the case in 2.6.0. This should have been fixed, so if it is
possible for you, you should try and upgrade to the latest version to see if
it works here.

preben

--
View this message in context: http://camel.465427.n5.nabble.com/Convert-jms-message-from-textmessage-to-bytemessage-tp4895362p5489080.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Convert jms message from textmessage to bytemessage

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Feb 16, 2012 at 4:48 AM, Ellen <YL...@statestreet.com> wrote:
> Hi there!
>
> I'm new to Camel and we have to use Camel 2.6.
> I have a simple route which receives BytesMessage and needs to send to
> external system as TextMessage. I have tried set jmsMessage=Text on the
> endpoint to the external system, but the external system still receives
> BytesMessage. Dose anyone know if this is a known issue with Camel 2.6? Is
> there is a workaround?
>

When using jmsMessageType=Text, then you enforce that in Camel.
The message is sent using a javax.jms.TextMessage. You can use a
debugger to check that if you want.
If not then thats a bug in Camel.

Notice that despite sending using a TextMessage, the content may still
appear as bytes from the consumer point of view.
In reality the impl of the broker may send text messages as bytes.



> Any help is appreciated!
>
> - Ellen
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Convert-jms-message-from-textmessage-to-bytemessage-tp4895362p5488418.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/