Slide 33
Slide 33 text
.
.
.
Azkarra can be configured for periodically reporting
the internal states of a KafkaStreams instance.
■ Use StreamLifecycleInterceptor:
⎼ MonitoringStreamsInterceptor
■ Accepts a pluggable reporter class
⎼ Default : KafkaMonitoringReporter
⎼ Publishes events that adhere to the
CloudEvents specification.
33
Putting it all together
Exporting Kafka Streams
States Anywhere
{
"id":
"appid:word-count;appsrv:localhost:8080;ts:1620691200000",
"source": "azkarra/ks/localhost:8080",
"specversion": "1.0",
"type": "io.streamthoughts.azkarra.streams.stateupdateevent",
"time": "2021-05-11T00:00:00.000+0000",
"datacontenttype": "application/json",
"ioazkarramonitorintervalms": 10000,
"ioazkarrastreamsappid": "word-count",
"ioazkarraversion": "0.9.2",
"ioazkarrastreamsappserver": "localhost:8080",
"data": {
"state": "RUNNING",
"threads": [
{
"name": "word-count-...-93e9a84057ad-StreamThread-1",
"state": "RUNNING",
"active_tasks": [],
"standby_tasks": [],
"clients": {}
}
],
"offsets": {
"group": "",
"consumers": []
},
"stores": {
"partitionRestoreInfos": [],
"partitionLagInfos": []
},
"state_changed_time": 1620691200000
}
}
Cloud Events