public class KafkaGelfSender extends Object implements GelfSender
GelfSender
using Kafka.Constructor and Description |
---|
KafkaGelfSender(org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]> kafkaProducer,
String topicName,
ErrorReporter errorReporter) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the sender and free resources.
|
boolean |
sendMessage(GelfMessage message)
Send the Gelf message.
|
public KafkaGelfSender(org.apache.kafka.clients.producer.KafkaProducer<byte[],byte[]> kafkaProducer, String topicName, ErrorReporter errorReporter)
public boolean sendMessage(GelfMessage message)
GelfSender
sendMessage
in interface GelfSender
message
- the messagepublic void close()
GelfSender
close
in interface GelfSender
close
in interface Closeable
close
in interface AutoCloseable
Copyright © 2013–2023. All rights reserved.