Class KafkaStreamsMicrometerListener
- java.lang.Object
-
- org.springframework.kafka.streams.KafkaStreamsMicrometerListener
-
- All Implemented Interfaces:
StreamsBuilderFactoryBean.Listener
public class KafkaStreamsMicrometerListener extends java.lang.Object implements StreamsBuilderFactoryBean.Listener
Creates aKafkaStreamsMetrics
for theKafkaStreams
.- Since:
- 2.5.3
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description KafkaStreamsMicrometerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Construct an instance with the provided registry.KafkaStreamsMicrometerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry, java.util.List<io.micrometer.core.instrument.Tag> tags)
Construct an instance with the provided registry and tags.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
streamsAdded(java.lang.String id, org.apache.kafka.streams.KafkaStreams kafkaStreams)
A newKafkaStreams
was created.void
streamsRemoved(java.lang.String id, org.apache.kafka.streams.KafkaStreams streams)
An existingKafkaStreams
was removed.
-
-
-
Constructor Detail
-
KafkaStreamsMicrometerListener
public KafkaStreamsMicrometerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry)
Construct an instance with the provided registry.- Parameters:
meterRegistry
- the registry.
-
KafkaStreamsMicrometerListener
public KafkaStreamsMicrometerListener(io.micrometer.core.instrument.MeterRegistry meterRegistry, java.util.List<io.micrometer.core.instrument.Tag> tags)
Construct an instance with the provided registry and tags.- Parameters:
meterRegistry
- the registry.tags
- the tags.
-
-
Method Detail
-
streamsAdded
public void streamsAdded(java.lang.String id, org.apache.kafka.streams.KafkaStreams kafkaStreams)
Description copied from interface:StreamsBuilderFactoryBean.Listener
A newKafkaStreams
was created.- Specified by:
streamsAdded
in interfaceStreamsBuilderFactoryBean.Listener
- Parameters:
id
- the streams id (factory bean name).kafkaStreams
- the streams;
-
streamsRemoved
public void streamsRemoved(java.lang.String id, org.apache.kafka.streams.KafkaStreams streams)
Description copied from interface:StreamsBuilderFactoryBean.Listener
An existingKafkaStreams
was removed.- Specified by:
streamsRemoved
in interfaceStreamsBuilderFactoryBean.Listener
- Parameters:
id
- the streams id (factory bean name).streams
- the streams;
-
-