camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: jms to kafka to jms
Date Wed, 16 Nov 2016 04:45:59 GMT
Hi,

I'm not sure if it relates to the deserializerClass option setting of kafka
consumer,  as you didn't set the option on the kafka endpoint of the second.
BTW, You can use the *jmsMessageType* option on the jms endpoint URL to
force a specific message type for all messages.



Willem Jiang

Blog: http://willemjiang.blogspot.com (English)
          http://jnn.iteye.com  (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem

On Wed, Nov 16, 2016 at 5:07 AM, Berryman, Eric <berryman@frib.msu.edu>
wrote:

> Hello!
>
> I have two routes; one from jms(BytesMessage) to kafka, and one from kafka
> to jms(BytesMessage).
> When I received my jms object at the end, I noticed it is a TextMessage
> instead of BytesMessage.
>
> from("jms:topic:jmsTopic")
>                         .to("kafka:kafkaserver:9092?topic=jpa-cache" +
> "&requestRequiredAcks=-1"
>                                 + "&serializerClass=org.apache.
> kafka.common.serialization.ByteArraySerializer&"
>                                 + "keySerializerClass=org.
> apache.kafka.common.serialization.ByteArraySerializer");
>
> from("kafka:kafkaserver:9092?topic=jpa-cache&groupId=cache&
> autoOffsetReset=earliest&consumersCount=1")
>                     .to("jms:topic:jmsTopic");
>
> Could someone help me preserve the BytesMessage?
>
> Thank you!
> Eric
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message