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, wait
routeReady
protected 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.Configurable
public void emit(T event)
Exporter
public void close() throws Exception
close
in interface AutoCloseable
Exception
public Set<String> reconfigurableConfigs()
reconfigurableConfigs
in interface org.apache.kafka.common.Reconfigurable
public void validateReconfiguration(Map<String,?> configs) throws org.apache.kafka.common.config.ConfigException
validateReconfiguration
in interface org.apache.kafka.common.Reconfigurable
org.apache.kafka.common.config.ConfigException
public void reconfigure(Map<String,?> configs)
reconfigure
in interface org.apache.kafka.common.Reconfigurable
public void setProducer(org.apache.kafka.clients.producer.Producer<String,byte[]> producer)