Class StaticTopicNameExtractor<K,V>
- java.lang.Object
-
- org.apache.kafka.streams.processor.internals.StaticTopicNameExtractor<K,V>
-
- All Implemented Interfaces:
TopicNameExtractor<K,V>
public class StaticTopicNameExtractor<K,V> extends Object implements TopicNameExtractor<K,V>
Static topic name extractor
-
-
Constructor Summary
Constructors Constructor Description StaticTopicNameExtractor(String topicName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
extract(K key, V value, RecordContext recordContext)
Extracts the topic name to send to.int
hashCode()
String
toString()
-
-
-
Field Detail
-
topicName
public final String topicName
-
-
Constructor Detail
-
StaticTopicNameExtractor
public StaticTopicNameExtractor(String topicName)
-
-
Method Detail
-
extract
public String extract(K key, V value, RecordContext recordContext)
Description copied from interface:TopicNameExtractor
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.- Specified by:
extract
in interfaceTopicNameExtractor<K,V>
- Parameters:
key
- the record keyvalue
- the record valuerecordContext
- current context metadata of the record- Returns:
- the topic name this record should be sent to
-
-