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

TopologyTestDriver isn't taking record headers into account during de/serialization

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.1.0
    • 2.6.0, 2.5.1
    • streams-test-utils
    • None

    Description

      When testing a Kafka stream we need the TopologyTestDriver.createOutputTopic to take record headers into account.

      Is it possible to use the record headers when deserialising when using the TopologyTestDriver.createOutputTopic?

      The only thing that needs to change is: 

      final K key = keyDeserializer.deserialize(record.topic(), record.key());
      final V value = valueDeserializer.deserialize(record.topic(), record.value());

      into: 

      final K key = keyDeserializer.deserialize(record.topic(), record.headers(), record.key());
      final V value = valueDeserializer.deserialize(record.topic(), record.headers(), record.value());

       

      Attachments

        Issue Links

          Activity

            People

              mjsax Matthias J. Sax
              sdutry Stefaan Dutry
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: