You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kafka.apache.org by Hussein Baghdadi <hu...@hotmail.com> on 2012/10/29 13:55:54 UTC

Is is possible to send Kryo serialized object to Kafka ?

Hi,
Is is possible to send Kryo serialized object to Kafka ?
Thanks. 		 	   		  

Re: Is is possible to send Kryo serialized object to Kafka ?

Posted by David Arthur <mu...@gmail.com>.
Messages in Kafka are just bytes, so as long as you can generate a byte array (byte[]) you can use anything with Kafka. You will need to implement adaptors for your serialization library that implement kafka.serializer.Decoder and kafka.serializer.Encoder.

See StringDecoder/StringEncoder for a simple example (https://github.com/apache/kafka/blob/trunk/core/src/main/scala/kafka/serializer/Decoder.scala#L30). Of course, you can use Java instead of Scala.

Cheers,
David

On Oct 29, 2012, at 8:55 AM, Hussein Baghdadi wrote:

> 
> Hi,
> Is is possible to send Kryo serialized object to Kafka ?
> Thanks.