Re: Kafka: writing custom Encoder/Serializer

2014-05-20 Thread pushkar priyadarshi
Producer producer = new Producer(config); Try this. On Wed, May 21, 2014 at 12:26 AM, Neha Narkhede wrote: > Pradeep, > > If you are writing a POC, I'd suggest you do that using the new producer > APIs< > http://people.apache.org/~nehanarkhede/kafka-0.9-producer-javadoc/doc/org/apache/kafka/cl

Re: Kafka: writing custom Encoder/Serializer

2014-05-20 Thread Neha Narkhede
Pradeep, If you are writing a POC, I'd suggest you do that using the new producer APIs. These are much easier to use, exposes more functionality and the new producer is faster tha

Re: Kafka: writing custom Encoder/Serializer

2014-05-20 Thread Kumar Pradeep
Thanks Pushkar for your response. I tried to send my own byte array; however the Kafka Producer Class does not take byte [] as input type. Do you have an example of this? Please share if you do; really appreciate. Here is my code: public class TestEventProducer { public static void main(

Re: Kafka: writing custom Encoder/Serializer

2014-05-20 Thread Jun Rao
The customized encoder/decoder has to have a constructor that takes (VerifiableProperties: props). Alternatively, you could do the encoding/decoding outside of Kafka client and just send byte[] to Kafka. The pluggable encoder/decoder will be gradually phased out in the future. Thanks, Jun On Tu

Re: Kafka: writing custom Encoder/Serializer

2014-05-20 Thread pushkar priyadarshi
you can send byte[] that you get by using your own serializer ; through kafka ().On the reciving side u can deseraialize from the byte[] and read back your object.for using this you will have to supply serializer.class=kafka.serializer.DefaultEncoder in the properties. On Tue, May 20, 2014 at 4:2

Kafka: writing custom Encoder/Serializer

2014-05-20 Thread Kumar Pradeep
I am trying to build a POC with Kafka 0.8.1. I am using my own java class as a Kafka message which has a bunch of String data types. For serializer.class property in my producer, I cannot use the default serializer class or the String serializer class that comes with Kafka library. I guess I nee