Package kieker.monitoring.writer.kafka
Class KafkaWriter
java.lang.Object
kieker.monitoring.writer.kafka.KafkaWriter
- All Implemented Interfaces:
kieker.monitoring.writer.raw.IRawDataWriter
public class KafkaWriter
extends java.lang.Object
implements kieker.monitoring.writer.raw.IRawDataWriter
Raw data writer which sends monitoring records to a Kafka topic.
- Since:
- 1.13
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONFIG_PROPERTY_ACKSThe name of the configuration property for the acks parameter.static java.lang.StringCONFIG_PROPERTY_BATCH_SIZEThe name of the configuration property for the batch size.static java.lang.StringCONFIG_PROPERTY_BOOTSTRAP_SERVERSThe name of the configuration property for the bootstrap servers.static java.lang.StringCONFIG_PROPERTY_BUFFER_MEMORYThe name of the configuration property for the buffer memory size.static java.lang.StringCONFIG_PROPERTY_LINGER_MSThe name of the configuration property for the linger interval.static java.lang.StringCONFIG_PROPERTY_TOPIC_NAMEThe name of the configuration property for the topic name. -
Constructor Summary
Constructors Constructor Description KafkaWriter(kieker.common.configuration.Configuration configuration)Creates a new Kafka writer using the given configuration. -
Method Summary
Modifier and Type Method Description voidonInitialization()voidonTermination()voidwriteData(java.nio.ByteBuffer buffer, int offset, int length)
-
Field Details
-
CONFIG_PROPERTY_ACKS
public static final java.lang.String CONFIG_PROPERTY_ACKSThe name of the configuration property for the acks parameter. -
CONFIG_PROPERTY_BATCH_SIZE
public static final java.lang.String CONFIG_PROPERTY_BATCH_SIZEThe name of the configuration property for the batch size. -
CONFIG_PROPERTY_BOOTSTRAP_SERVERS
public static final java.lang.String CONFIG_PROPERTY_BOOTSTRAP_SERVERSThe name of the configuration property for the bootstrap servers. -
CONFIG_PROPERTY_BUFFER_MEMORY
public static final java.lang.String CONFIG_PROPERTY_BUFFER_MEMORYThe name of the configuration property for the buffer memory size. -
CONFIG_PROPERTY_LINGER_MS
public static final java.lang.String CONFIG_PROPERTY_LINGER_MSThe name of the configuration property for the linger interval. -
CONFIG_PROPERTY_TOPIC_NAME
public static final java.lang.String CONFIG_PROPERTY_TOPIC_NAMEThe name of the configuration property for the topic name.
-
-
Constructor Details
-
KafkaWriter
public KafkaWriter(kieker.common.configuration.Configuration configuration)Creates a new Kafka writer using the given configuration.- Parameters:
configuration- The configuration to use
-
-
Method Details
-
onInitialization
public void onInitialization()- Specified by:
onInitializationin interfacekieker.monitoring.writer.raw.IRawDataWriter
-
onTermination
public void onTermination()- Specified by:
onTerminationin interfacekieker.monitoring.writer.raw.IRawDataWriter
-
writeData
public void writeData(java.nio.ByteBuffer buffer, int offset, int length)- Specified by:
writeDatain interfacekieker.monitoring.writer.raw.IRawDataWriter
-