Hi Pushkar, If you’re not too concerned about compactness, I think Jackson json serialization is the easiest way to serialize complex types.
There’s also a kip in progress to add a list serde. You might take a look at that proposal for ideas to write your own. Thanks, John On Thu, May 7, 2020, at 08:17, Nicolas Carlot wrote: > Won't say it's a good idea to use java serialized classes for messages, but > you should use a byteArraySerializer if you want to do such things > > Le jeu. 7 mai 2020 à 14:32, Pushkar Deole <pdeole2...@gmail.com> a écrit : > > > Hi All, > > > > I have a requirement to store a record with key as java String and value as > > java's ArrayList in the kafka topic. Kafka has by default provided a > > StringSerializer and StringDeserializer, however for java ArrayList, how > > can get serializer. Do I need to write my own? Can someone share if someone > > already has written one? > > > > > -- > *Nicolas Carlot* > > Lead dev > | | nicolas.car...@chronopost.fr > > > *Veuillez noter qu'à partir du 20 mai, le siège Chronopost déménage. La > nouvelle adresse est : 3 boulevard Romain Rolland 75014 Paris* > > [image: Logo Chronopost] > | chronopost.fr <http://www.chronopost.fr/> > Suivez nous sur Facebook <https://fr-fr.facebook.com/chronopost> et Twitter > <https://twitter.com/chronopost>. > > [image: DPD Group] >