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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
extract(K key, V value, RecordContext recordContext)
Extracts the topic name to send to.
-
-
-
Method Detail
-
extract
String extract(K key, V value, RecordContext recordContext)
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
-
-