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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 2.6.0, 2.5.1
    • Component/s: streams-test-utils
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: