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 java.lang.Object implements TopicNameExtractor<K,V>
Static topic name extractor
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
topicName
-
Constructor Summary
Constructors Constructor Description StaticTopicNameExtractor(java.lang.String topicName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
extract(K key, V value, RecordContext recordContext)
Extracts the topic name to send to.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
extract
public java.lang.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
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-