Class SingleTopicSupplier<T>

java.lang.Object
io.confluent.telemetry.events.exporter.kafka.async.SingleTopicSupplier<T>
All Implemented Interfaces:
TopicSupplier<T>

public class SingleTopicSupplier<T> extends Object implements TopicSupplier<T>
  • Constructor Details

    • SingleTopicSupplier

      public SingleTopicSupplier(org.apache.kafka.clients.admin.NewTopic newTopic, Properties adminClientProperties)
  • Method Details

    • topic

      public Optional<String> topic(T data)
      Description copied from interface: TopicSupplier
      Get a topic for the record. This allows us to get the topic management out of the exporter and makes it possible to extend the exporter for any kind of topic management and routing schemes. For eg - manage single topics for default case and send all data to the same topic - manage multiple topics with reconfiguration and send data to topics based on route extension - manage multiple topics and send data to topics based on feed labels
      Specified by:
      topic in interface TopicSupplier<T>
      Parameters:
      data -
      Returns:
      topic to send the data, if topic is empty, drop the data.