Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka, mail # user - Is is possible to send Kryo serialized object to Kafka ?


Copy link to this message
-
Re: Is is possible to send Kryo serialized object to Kafka ?
David Arthur 2012-10-29, 17:53
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.