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 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 key
        value - the record value
        recordContext - current context metadata of the record
        Returns:
        the topic name this record should be sent to