You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Stefaan Dutry (Jira)" <ji...@apache.org> on 2020/05/29 08:19:00 UTC
[jira] [Created] (KAFKA-10066) TopologyTestDriver.createOutputTopic
isn't taking record headers into account during deserialization
Stefaan Dutry created KAFKA-10066:
-------------------------------------
Summary: TopologyTestDriver.createOutputTopic isn't taking record headers into account during deserialization
Key: KAFKA-10066
URL: https://issues.apache.org/jira/browse/KAFKA-10066
Project: Kafka
Issue Type: Bug
Components: streams-test-utils
Affects Versions: 2.5.0
Reporter: Stefaan Dutry
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)