You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Daniel Compton (JIRA)" <ji...@apache.org> on 2014/07/03 06:28:24 UTC

[jira] [Created] (KAFKA-1518) KafkaMetricsReporter prevents Kafka from starting if the custom reporter throws an exception

Daniel Compton created KAFKA-1518:
-------------------------------------

             Summary: KafkaMetricsReporter prevents Kafka from starting if the custom reporter throws an exception
                 Key: KAFKA-1518
                 URL: https://issues.apache.org/jira/browse/KAFKA-1518
             Project: Kafka
          Issue Type: Bug
          Components: tools
    Affects Versions: 0.8.1.1
            Reporter: Daniel Compton


When Kafka starts up, it [starts|https://github.com/apache/kafka/blob/0.8.1/core/src/main/scala/kafka/metrics/KafkaMetricsReporter.scala#L60] custom metrics reporters. If any of these throw an exception on startup then this will block Kafka from starting.

For example using [kafka-riemann-reporter|https://github.com/pingles/kafka-riemann-reporter], if Riemann is not available then it will throw an [IO Exception|https://github.com/pingles/kafka-riemann-reporter/issues/1] which isn't caught by KafkaMetricsReporter. This means that Kafka will fail to start until it can connect to Riemann, coupling a HA system to a non HA system.

It would probably be better to log the error and perhaps have a callback hook to the reporter where they can handle it and startup in the background.



--
This message was sent by Atlassian JIRA
(v6.2#6252)