...
For instance, aggregate grouped (by key) values together in a list to do other subsequent operations on the collection.
Public Interfaces
- New class class org.apache.kafka.common.serialization.ListSerializer which which implements the
Serializer<List<T>>
Serializer<List<T>> interface - New class class org.apache.kafka.common.serialization.ListDeserializer which implements
Deserializer<List<T>>
implements Deserializer<List<T>> interface - New subclass
ListSerde
in ListSerde<T> in org.apache.kafka.common.serialization.Serdes Serdes which creates new serde based onListSerializer
and on ListSerializer and ListDeserializer classes
...
- New method public static <T> Serde<List<T>> ListSerde(Serde<T> innerSerde) in org.apache.kafka.common.serialization.Serdes
...
- class
Proposed Changes
This KIP proposes 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 then serializer/deserializer of String Serde StringSerde will be used to serialize/deserialize each entry in `List<String>`.
...