Praveen,

The archive containing the source code did not come through so it is a bit 
difficult to trace from the POM file alone. One area I noticed from the POM is 
the majority of the Camel libraries are using version 2.10.1 while the Kafka 
component is at version 2.15.1. Is there a reason for the differences in 
library versions?

Also, have you looked into the Avro dataformat [1] for serialization if that is 
desired?

- Andy

[1] - http://camel.apache.org/avro.html 


-- 
Andrew Block


On September 8, 2015 at 2:56:07 PM, Praveen.A (pravee...@target.com) wrote:

Hello Experts,

 

We are trying to push Avro formatted message into Kafka through Camel and 
caught with below exception so couldn’t succeeded further.

 

I have attached the complete source code along with pom.xml file for version 
details.

 

Please let us know the best way of pushing Avro messages into Kafka through 
camel integration.

 

15/09/08 16:43:21 INFO utils.VerifiableProperties: Verifying properties

15/09/08 16:43:21 INFO utils.VerifiableProperties: Property 
metadata.broker.list is overridden to edelx0002:9092

15/09/08 16:43:21 INFO utils.VerifiableProperties: Property partitioner.class 
is overridden to kafka.producer.DefaultPartitioner

15/09/08 16:43:21 INFO utils.VerifiableProperties: Property 
request.required.acks is overridden to 0

15/09/08 16:43:21 INFO utils.VerifiableProperties: Property serializer.class is 
overridden to kafka.serializer.DefaultEncoder

Exception in thread "main" java.lang.NullPointerException

       at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:67)

       at org.apache.camel.impl.MessageSupport.getBody(MessageSupport.java:47)

       at 
org.apache.camel.component.kafka.KafkaProducer.process(KafkaProducer.java:72)

       at 
com.tgt.stores.CamelAvroProducer.processItemMessage(CamelAvroProducer.java:145)

       at com.tgt.stores.TestProducer.main(TestProducer.java:12)

 

 

Regards,

Praveen

Reply via email to