You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (Jira)" <ji...@apache.org> on 2020/05/29 23:36:00 UTC

[jira] [Commented] (KAFKA-10066) TopologyTestDriver isn't taking record headers into account during de/serialization

    [ https://issues.apache.org/jira/browse/KAFKA-10066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17120024#comment-17120024 ] 

Matthias J. Sax commented on KAFKA-10066:
-----------------------------------------

Just saw your comment now, [~vvcephei] – already picked it up myself.

> TopologyTestDriver isn't taking record headers into account during de/serialization
> -----------------------------------------------------------------------------------
>
>                 Key: KAFKA-10066
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10066
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams-test-utils
>    Affects Versions: 1.1.0
>            Reporter: Stefaan Dutry
>            Assignee: Matthias J. Sax
>            Priority: Minor
>
> 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: 
> {code:java}
> final K key = keyDeserializer.deserialize(record.topic(), record.key());
> final V value = valueDeserializer.deserialize(record.topic(), record.value());{code}
> into: 
> {code:java}
> final K key = keyDeserializer.deserialize(record.topic(), record.headers(), record.key());
> final V value = valueDeserializer.deserialize(record.topic(), record.headers(), record.value());{code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)