The monasca_events_api.app.healthcheck.kafka_check
Module¶
-
class
monasca_events_api.app.healthcheck.kafka_check.
CheckResult
(healthy, message)¶ Bases:
tuple
Result from the healthcheck, contains healthy(boolean) and message
-
property
healthy
¶ Alias for field number 0
-
property
message
¶ Alias for field number 1
-
property
-
class
monasca_events_api.app.healthcheck.kafka_check.
KafkaHealthCheck
[source]¶ Bases:
object
Evaluates kafka health
Healthcheck verifies if:
kafka server is up and running
there is a configured topic in kafka
If following conditions are met healthcheck returns healthy status. Otherwise unhealthy status is returned with explanation.
Example of middleware configuration:
[events_publisher] kafka_url = localhost:8900 kafka_topics = events
- Note:
It is possible to specify multiple topics if necessary. Just separate them with ,