public class MicrometerProducerListener extends Object implements SenderOptions.ProducerListener
KafkaClientMetrics
.Constructor and Description |
---|
MicrometerProducerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Construct an instance with the provided registry.
|
MicrometerProducerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry,
List<io.micrometer.core.instrument.Tag> tags)
Construct an instance with the provided registry and tags.
|
Modifier and Type | Method and Description |
---|---|
void |
producerAdded(String id,
org.apache.kafka.clients.producer.Producer<?,?> producer)
A new producer was created.
|
void |
producerRemoved(String id,
org.apache.kafka.clients.producer.Producer<?,?> producer)
An existing producer was removed.
|
public MicrometerProducerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry)
meterRegistry
- the registry.public MicrometerProducerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry, List<io.micrometer.core.instrument.Tag> tags)
meterRegistry
- the registry.tags
- the tags.public void producerAdded(String id, org.apache.kafka.clients.producer.Producer<?,?> producer)
SenderOptions.ProducerListener
producerAdded
in interface SenderOptions.ProducerListener
id
- the producer id (factory bean name and client.id separated by a
period).producer
- the producer.public void producerRemoved(String id, org.apache.kafka.clients.producer.Producer<?,?> producer)
SenderOptions.ProducerListener
producerRemoved
in interface SenderOptions.ProducerListener
id
- the producer id (factory bean name and client.id separated by a period).producer
- the producer.