Interface Exporter<T>

All Superinterfaces:
AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.Reconfigurable
All Known Implementing Classes:
AsyncKafkaExporter, EventAsyncKafkaExporter, EventHttpExporter, EventKafkaExporter, HttpExporter, KafkaExporter, LogExporter

public interface Exporter<T> extends org.apache.kafka.common.Reconfigurable, AutoCloseable
Exporters are responsible for delivering events to their destinations
  • Method Summary

    Modifier and Type
    Method
    Description
    emit(T event)
    Filter and transform the events as appropriate and send to the specified destination.
    default boolean
    routeReady(T event)
    Checks if a topic is ready.

    Methods inherited from interface AutoCloseable

    close

    Methods inherited from interface org.apache.kafka.common.Configurable

    configure

    Methods inherited from interface org.apache.kafka.common.Reconfigurable

    reconfigurableConfigs, reconfigure, validateReconfiguration
  • Method Details

    • emit

      CompletableFuture<Boolean> emit(T event)
      Filter and transform the events as appropriate and send to the specified destination. This method takes care of batching, serialization and retries.
      Returns:
      A CompletableFuture object with a Boolean value, indicates if event has been sent successfully
    • routeReady

      default boolean routeReady(T event)
      Checks if a topic is ready. This is specifically used for transports where the routes require some time to be ready. For eg. Kafka topics. For high volume audit event streams, the events are only sent to Kafka exporter if the topic is ready.
      Returns:
      if the route for this event is ready.