...
Code Block | ||||
---|---|---|---|---|
| ||||
package org.apache.kafka.streams.test; public class TestOutputTopic<K, V> { //Constructor with serializers TestOutputTopic(final TopologyTestDriver driver, final String topic, final Serde<K> keySerde, final Serde<V> valueSerde); //Constructor with serdes TestOutputTopic(final TopologyTestDriver driver, final String topic, final Deserializer<K> keyDeserializer, final Deserializer<V> valueDeserializer); //Methods to readOutput ProducerRecord<K, V> readRecord(); KeyValue<K, V> readKeyValue(); V readValue(); //Output as collection Map<K, V> readKeyValuesToMap(); List<KeyValue<K, V>> readKeyValuesToList(); List<V> readValuesToList(); //Possible If KPI-451 is included <K, V> Iterable<ProducerRecord<K, V>> iterableRecords(); <K, V> Iterable<KeyValue<K, V>> iterableKeyValues(); <V> Iterable<V> iterableValues(); } |
...
- This version contains both original methods to fetch group of output as List or Map and KIP-451: Make TopologyTestDriver output iterable is proposing similar with Iterable. The collection one or another might be removed in favour of Iterable.