Class ProducerKafkaMetricsReporter

java.lang.Object
io.micronaut.configuration.kafka.metrics.AbstractKafkaMetricsReporter
io.micronaut.configuration.kafka.metrics.ProducerKafkaMetricsReporter
All Implemented Interfaces:
io.micrometer.core.instrument.binder.MeterBinder, Closeable, AutoCloseable, org.apache.kafka.common.Configurable, org.apache.kafka.common.metrics.MetricsReporter, org.apache.kafka.common.Reconfigurable

@Internal public class ProducerKafkaMetricsReporter extends AbstractKafkaMetricsReporter
A MetricsReporter class for producer metrics.
  • Constructor Details

    • ProducerKafkaMetricsReporter

      public ProducerKafkaMetricsReporter()
  • Method Details

    • getMetricPrefix

      protected String getMetricPrefix()
      Abstract method to implement with the metric prefix for the reporter.
      Specified by:
      getMetricPrefix in class AbstractKafkaMetricsReporter
      Returns:
      prefix name
    • close

      @PreDestroy public void close()
      Method to close bean. This must remain here for metrics to continue to function correctly for some reason?!.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.kafka.common.metrics.MetricsReporter
      Overrides:
      close in class AbstractKafkaMetricsReporter