Class KafkaMonitoringReporter
- java.lang.Object
-
- io.streamthoughts.azkarra.runtime.interceptors.monitoring.KafkaMonitoringReporter
-
- All Implemented Interfaces:
Configurable
,KafkaStreamsContainerAware
,MonitoringReporter
,AutoCloseable
public class KafkaMonitoringReporter extends Object implements MonitoringReporter, KafkaStreamsContainerAware
AMonitoringReporter
that send a serializedKafkaStreamsMetadata
into a Kafka topic.
-
-
Constructor Summary
Constructors Constructor Description KafkaMonitoringReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes thisMonitoringReporter
.void
configure(Conf configuration)
Configure thisStreamsMetadataReporter
.void
report(KafkaStreamsMetadata metadata)
Called periodically by the monitoring tasks.void
setKafkaStreamsContainer(KafkaStreamsContainer container)
Sets the KafkaStreamsContainer that this object runs in.KafkaMonitoringReporter
withAdvertisedApplicationServer(String advertisedServer)
KafkaMonitoringReporter
withTopic(String topic)
-
-
-
Method Detail
-
report
public void report(KafkaStreamsMetadata metadata)
Called periodically by the monitoring tasks. This method can be called afterMonitoringReporter.close()
has been invoked if the stream instance is restarted.- Specified by:
report
in interfaceMonitoringReporter
- Parameters:
metadata
- theKafkaStreamsMetadata
change to report.
-
configure
public void configure(Conf configuration)
Configure thisStreamsMetadataReporter
.- Specified by:
configure
in interfaceConfigurable
- Specified by:
configure
in interfaceMonitoringReporter
- Parameters:
configuration
- theConf
instance used to configure this instance.
-
withTopic
public KafkaMonitoringReporter withTopic(String topic)
-
withAdvertisedApplicationServer
public KafkaMonitoringReporter withAdvertisedApplicationServer(String advertisedServer)
-
setKafkaStreamsContainer
public void setKafkaStreamsContainer(KafkaStreamsContainer container)
Sets the KafkaStreamsContainer that this object runs in.- Specified by:
setKafkaStreamsContainer
in interfaceKafkaStreamsContainerAware
- Parameters:
container
- theKafkaStreamsContainer
.
-
close
public void close()
Closes thisMonitoringReporter
. Called when aKafkaStreamsContainer
is stopped.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceMonitoringReporter
-
-