kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neha Narkhede <neha.narkh...@gmail.com>
Subject Re: is it smarter to go with a java class for message serialization/des?
Date Tue, 17 Jun 2014 22:06:35 GMT
Yes, backwards incompatibility is a problem when using Java/Scala object
serialization. At LinkedIn, we use Avro as the serialization format for
Kafka data.

Thanks,
Neha


On Tue, Jun 17, 2014 at 11:58 AM, S Ahmed <sahmed1020@gmail.com> wrote:

> My app is in scala and a quick search on serializing a scala class seems to
> have potential issues with different versions of scala (I could be wrong as
> I did a quick search).
>
> Is it generally just a better idea to use plain old java classes for kafka
> messages?
>
> i.e. I simply use jackson like:
>
> public class User implements Serializable {
> ...
> }
>
> // kakfa
> val it = stream.iterator()
> while (it.hasNext()) {
>   val messageAndTopic = it.next
>
>   val user = mapper.readValue(messageAndTopic.message(), classOf[User])
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message