public class MicrometerConsumerListener extends Object implements ReceiverOptions.ConsumerListener
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,
List<io.micrometer.core.instrument.Tag> tags)
Construct an instance with the provided registry and tags.
|
Modifier and Type | Method and Description |
---|---|
void |
consumerAdded(String id,
org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
A new consumer was created.
|
void |
consumerRemoved(String id,
org.apache.kafka.clients.consumer.Consumer<?,?> 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, List<io.micrometer.core.instrument.Tag> tags)
meterRegistry
- the registry.tags
- the tags.public void consumerAdded(String id, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
ReceiverOptions.ConsumerListener
consumerAdded
in interface ReceiverOptions.ConsumerListener
id
- the consumer id.consumer
- the consumer.public void consumerRemoved(String id, org.apache.kafka.clients.consumer.Consumer<?,?> consumer)
ReceiverOptions.ConsumerListener
consumerRemoved
in interface ReceiverOptions.ConsumerListener
id
- the consumer id.consumer
- the consumer.