T - public class AsyncKafkaExporter<T> extends Object implements Exporter<T>
The exporter emit method returns a CompletableFuture object with a boolean that indicates if event has been sent or dropped, caller can either wait on the result and decide what to do based on result, or ignore the result.
| Modifier and Type | Class and Description |
|---|---|
static class |
AsyncKafkaExporter.Builder<T> |
| Modifier | Constructor and Description |
|---|---|
protected |
AsyncKafkaExporter(int bufferSize,
TopicSupplier<T> topicSupplier,
org.apache.kafka.clients.producer.Producer<String,byte[]> producer,
Function<T,org.apache.kafka.clients.producer.ProducerRecord<String,byte[]>> dataSerializer) |
protected |
AsyncKafkaExporter(Properties producerProperties,
int bufferSize,
TopicSupplier<T> topicSupplier,
Function<T,org.apache.kafka.clients.producer.ProducerRecord<String,byte[]>> dataSerializer) |
| Modifier and Type | Method and Description |
|---|---|
BlockingDeque<io.confluent.telemetry.events.exporter.kafka.async.AsyncKafkaExporter.Tuple<T>> |
buffer() |
void |
close() |
void |
configure(Map<String,?> configs) |
CompletableFuture<Boolean> |
emit(T t)
Filter and transform the events as appropriate and send to the specified destination.
|
static <T> AsyncKafkaExporter.Builder<T> |
newBuilder() |
Object |
producer() |
Set<String> |
reconfigurableConfigs() |
void |
reconfigure(Map<String,?> configs) |
void |
validateReconfiguration(Map<String,?> configs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrouteReadyprotected AsyncKafkaExporter(int bufferSize,
TopicSupplier<T> topicSupplier,
org.apache.kafka.clients.producer.Producer<String,byte[]> producer,
Function<T,org.apache.kafka.clients.producer.ProducerRecord<String,byte[]>> dataSerializer)
protected AsyncKafkaExporter(Properties producerProperties, int bufferSize, TopicSupplier<T> topicSupplier, Function<T,org.apache.kafka.clients.producer.ProducerRecord<String,byte[]>> dataSerializer)
public static <T> AsyncKafkaExporter.Builder<T> newBuilder()
public Set<String> reconfigurableConfigs()
reconfigurableConfigs in interface org.apache.kafka.common.Reconfigurablepublic void validateReconfiguration(Map<String,?> configs) throws org.apache.kafka.common.config.ConfigException
validateReconfiguration in interface org.apache.kafka.common.Reconfigurableorg.apache.kafka.common.config.ConfigExceptionpublic void reconfigure(Map<String,?> configs)
reconfigure in interface org.apache.kafka.common.Reconfigurablepublic void configure(Map<String,?> configs)
configure in interface org.apache.kafka.common.Configurablepublic CompletableFuture<Boolean> emit(T t)
Exporterpublic BlockingDeque<io.confluent.telemetry.events.exporter.kafka.async.AsyncKafkaExporter.Tuple<T>> buffer()
public void close()
close in interface AutoCloseablepublic Object producer()