Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-8326

Add Serde<List<Inner>> support

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: clients, streams
    • Labels:

      Description

      This ticket proposes adding new ListSerializer and ListDeserializer classes as well as support for the new classes into the Serdes class. This will allow using List Serde of type Serde<List<Inner>> directly from Consumers, Producers and Streams.

      Serde<List<Inner>> serialization and deserialization will be done through repeatedly calling a serializer/deserializer for each entry provided by passed generic Inner's Serde. For example, if you want to create List of Strings serde, then serializer/deserializer of StringSerde 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-windowshttps://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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                daniyar94 Daniyar Yeralin
                Reporter:
                daniyar94 Daniyar Yeralin
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated: