Re: How to send serialized object in Kafka Producer

2014-12-05 Thread Guozhang Wang
You need to write your own serializer (e.g. BeanSerializer extends Encoder[T]) for bean object and specify that in: properties.put("serializer.class","BeanSerializer") Guozhang

Re: How to send serialized object in Kafka Producer

2014-12-05 Thread Ramesh K
Dear Guozhang, Sorry for the late reply. Please see the sample code which i written to send the bean object. import java.util.Properties; import kafka.producer.KeyedMessage; import kafka.producer.ProducerConfig; public class KafkaProducerBean { final static String TOPIC = "*alarm*"; public sta

Re: How to send serialized object in Kafka Producer

2014-12-02 Thread Guozhang Wang
Ramesh, Which producer are you using in 0.8.1? kafka.api.producer or org.apache.kafka.clients.producer? Guozhang On Tue, Dec 2, 2014 at 2:12 AM, Ramesh K wrote: > Hi, > > I have written the basic program to send String or byte[] messages to > consumer from producer by using java & Kafka 0.8.1

How to send serialized object in Kafka Producer

2014-12-02 Thread Ramesh K
Hi, I have written the basic program to send String or byte[] messages to consumer from producer by using java & Kafka 0.8.1 . It Works perfectly.But i wanted to send serialized object(Java Bean Object). Is it possible to send the serialized object from producer to consumer? if possible, please