The ByteArrayDeserializer at the consumer worked! Thank you!
-----Original Message----- From: Willem Jiang [mailto:willem.ji...@gmail.com] Sent: Tuesday, November 15, 2016 11:46 PM To: users@camel.apache.org Subject: Re: jms to kafka to jms 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 <berry...@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 > >