public class AsyncKafkaExporter<T> extends Object implements Exporter<T>
| Modifier and Type | Field and Description |
|---|---|
protected Function<T,org.apache.kafka.clients.producer.ProducerRecord<String,byte[]>> |
dataSerializer |
protected AtomicLong |
droppedEventCount |
protected AtomicReference<Exception> |
droppedEventException |
protected long |
lastLoggedCount |
protected long |
lastLoggedTimestamp |
protected String |
topicName |
| Constructor and Description |
|---|
AsyncKafkaExporter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
configure(Map<String,?> configs) |
void |
emit(T event)
Filter and transform the events as appropriate and send to the specified destination.
|
Set<String> |
reconfigurableConfigs() |
void |
reconfigure(Map<String,?> configs) |
void |
setProducer(org.apache.kafka.clients.producer.Producer<String,byte[]> producer) |
void |
validateReconfiguration(Map<String,?> configs) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrouteReadyprotected final AtomicLong droppedEventCount
protected final AtomicReference<Exception> droppedEventException
protected Function<T,org.apache.kafka.clients.producer.ProducerRecord<String,byte[]>> dataSerializer
protected long lastLoggedTimestamp
protected long lastLoggedCount
protected String topicName
public void configure(Map<String,?> configs)
configure in interface org.apache.kafka.common.Configurablepublic void emit(T event)
Exporterpublic void close()
throws Exception
close in interface AutoCloseableExceptionpublic 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 setProducer(org.apache.kafka.clients.producer.Producer<String,byte[]> producer)