[ 
https://issues.apache.org/jira/browse/KAFKA-8326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Daniyar Yeralin updated KAFKA-8326:
-----------------------------------
    Description: 
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 ListSerde<>(Serdes.String())`, 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]

  was:
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]


> 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 ListSerde<>(Serdes.String())`, 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)

Reply via email to