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

serde in ConsoleConsumer with access to headers

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.0
    • Fix Version/s: None
    • Component/s: consumer
    • Labels:
      None

      Description

      ML thread here : https://lists.apache.org/thread.html/ab8c3094945cb9f9312fd3614a5b4454f24756cfa1a702ef5c739c8f@%3Cusers.kafka.apache.org%3E

       

      The Deserializer interface has two methods, one that gives access to the headers and one that does not. ConsoleConsumer.scala only calls the latter method. It would be nice if it were to call the default method that provides header access, so that custom serde that depends on headers becomes possible. 

      Currently it does this:

       

      deserializer.map(_.deserialize(topic, nonNullBytes).toString.
              getBytes(StandardCharsets.UTF_8)).getOrElse(nonNullBytes)
      

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                huxi_2b huxihx
                Reporter:
                heymjo Jorg Heymans
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: