public class KafkaSender extends Object implements EventSender
KafkaProducer.| Constructor and Description |
|---|
KafkaSender(org.apache.kafka.clients.producer.KafkaProducer<String,byte[]> kafkaProducer) |
| Modifier and Type | Method and Description |
|---|---|
void |
send(String topic,
byte[] message) |
void |
start() |
void |
stop() |
public KafkaSender(org.apache.kafka.clients.producer.KafkaProducer<String,byte[]> kafkaProducer)
public void start()
throws Exception
start in interface io.dropwizard.lifecycle.ManagedExceptionpublic void stop()
throws Exception
stop in interface io.dropwizard.lifecycle.ManagedExceptionpublic void send(String topic, byte[] message)
send in interface EventSenderCopyright © 2017. All rights reserved.