K - the key type.V - the value type.public class MicrometerConsumerListener<K,V> extends java.lang.Object implements ConsumerFactory.Listener<K,V>
KafkaClientMetrics.| Constructor and Description |
|---|
MicrometerConsumerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Construct an instance with the provided registry.
|
MicrometerConsumerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry,
java.util.List<io.micrometer.core.instrument.Tag> tags)
Construct an instance with the provided registry and tags.
|
| Modifier and Type | Method and Description |
|---|---|
void |
consumerAdded(java.lang.String id,
org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
A new consumer was created.
|
void |
consumerRemoved(java.lang.String id,
org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
An existing consumer was removed.
|
public MicrometerConsumerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry)
meterRegistry - the registry.public MicrometerConsumerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry,
java.util.List<io.micrometer.core.instrument.Tag> tags)
meterRegistry - the registry.tags - the tags.public void consumerAdded(java.lang.String id,
org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
ConsumerFactory.ListenerconsumerAdded in interface ConsumerFactory.Listener<K,V>id - the consumer id (factory bean name and client.id separated by a
period).consumer - the consumer.public void consumerRemoved(java.lang.String id,
org.apache.kafka.clients.consumer.Consumer<K,V> consumer)
ConsumerFactory.ListenerconsumerRemoved in interface ConsumerFactory.Listener<K,V>id - the consumer id (factory bean name and client.id separated by a
period).consumer - the consumer.