Class KafkaExporter<T>

java.lang.Object
io.confluent.telemetry.events.exporter.kafka.KafkaExporter<T>
All Implemented Interfaces:
Exporter<T>, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.Reconfigurable
Direct Known Subclasses:
EventKafkaExporter

public class KafkaExporter<T> extends Object implements Exporter<T>
  • Constructor Details

    • KafkaExporter

      public KafkaExporter()
    • KafkaExporter

      public KafkaExporter(Function<Properties, org.apache.kafka.clients.producer.Producer<String,byte[]>> producerFactory)
  • Method Details

    • configure

      public void configure(Map<String,?> configs)
      Specified by:
      configure in interface org.apache.kafka.common.Configurable
    • emit

      public CompletableFuture<Boolean> emit(T data)
      Description copied from interface: Exporter
      Filter and transform the events as appropriate and send to the specified destination. This method takes care of batching, serialization and retries.
      Specified by:
      emit in interface Exporter<T>
      Returns:
      A CompletableFuture object with a Boolean value, indicates if event has been sent successfully
    • close

      public void close() throws Exception
      Specified by:
      close in interface AutoCloseable
      Throws:
      Exception
    • reconfigurableConfigs

      public Set<String> reconfigurableConfigs()
      Specified by:
      reconfigurableConfigs in interface org.apache.kafka.common.Reconfigurable
    • validateReconfiguration

      public void validateReconfiguration(Map<String,?> configs) throws org.apache.kafka.common.config.ConfigException
      Specified by:
      validateReconfiguration in interface org.apache.kafka.common.Reconfigurable
      Throws:
      org.apache.kafka.common.config.ConfigException
    • reconfigure

      public void reconfigure(Map<String,?> configs)
      Specified by:
      reconfigure in interface org.apache.kafka.common.Reconfigurable
    • producer

      public org.apache.kafka.clients.producer.Producer<String,byte[]> producer()