[ https://issues.apache.org/jira/browse/KAFKA-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16834053#comment-16834053 ]
Daniyar Yeralin edited comment on KAFKA-8326 at 5/7/19 1:26 AM: ---------------------------------------------------------------- TODO: once implementation is finalized and approved, proceed with writing test cases for List Serde was (Author: daniyar94): TODO: once implementation is finalized and approved proceed with writing test cases for List Serde > Add List<T> Serde > ----------------- > > Key: KAFKA-8326 > URL: https://issues.apache.org/jira/browse/KAFKA-8326 > Project: Kafka > Issue Type: Improvement > Components: clients, streams > Reporter: Daniyar Yeralin > Assignee: Daniyar Yeralin > Priority: Minor > Labels: kip > > I propose _adding new ListSerializer and ListDeserializer classes as well as > support for the new classes into the Serdes class. This will allow using > List<T> Serde directly from Consumers, Producers and Streams._ > _List<T> serialization and deserialization will be done through repeatedly > calling a serializer/deserializer for each entry provided by passed generic > T's Serde._ > _For example, if you want to create List of Strings serde, you will have to > declare `new Serdes.ListSerde<>(Serdes.String(), > Comparator.comparing(String::length))`, in this case serializer/deserializer > of String Serde will be used to serialize/deserialize each entry in > `List<String>`._ > I believe there are many use cases where List Serde could be used. Ex. > [https://stackoverflow.com/questions/41427174/aggregate-java-objects-in-a-list-with-kafka-streams-dsl-windows], > > [https://stackoverflow.com/questions/46365884/issue-with-arraylist-serde-in-kafka-streams-api] > For instance, aggregate grouped (by key) values together in a list to do > other subsequent operations on the collection. > > KIP Link: > [https://cwiki.apache.org/confluence/display/KAFKA/KIP-466%3A+Add+support+for+List%3CT%3E+serialization+and+deserialization] -- This message was sent by Atlassian JIRA (v7.6.3#76005)