Interface TopicNameExtractor<K,V>
public interface TopicNameExtractor<K,V>
An interface that allows to dynamically determine the name of the Kafka topic to send at the sink node of the topology.
-
Method Summary
Modifier and TypeMethodDescriptionextract
(K key, V value, RecordContext recordContext) Extracts the topic name to send to.
-
Method Details
-
extract
Extracts the topic name to send to. The topic name must already exist, since the Kafka Streams library will not try to automatically create the topic with the extracted name.- Parameters:
key
- the record keyvalue
- the record valuerecordContext
- current context metadata of the record- Returns:
- the topic name this record should be sent to
-