From a1e0eaaa134273a05715cb7d82cd1a3ec1cd587d Mon Sep 17 00:00:00 2001 From: Etienne Champetier Date: Thu, 9 Mar 2017 03:10:32 +0000 Subject: [PATCH] Make ALL_BROKERS_DOWN a non fatal error Signed-off-by: Etienne Champetier --- kafkacat.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/kafkacat.c b/kafkacat.c index d76677cf..9b035587 100644 --- a/kafkacat.c +++ b/kafkacat.c @@ -1035,12 +1035,13 @@ static void term (int sig) { static void error_cb (rd_kafka_t *rk, int err, const char *reason, void *opaque) { - if (err == RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN) - FATAL("%s: %s: terminating", rd_kafka_err2str(err), + if (err == RD_KAFKA_RESP_ERR__ALL_BROKERS_DOWN) { + ERROR("%s: %s", rd_kafka_err2str(err), reason ? reason : ""); - - INFO(1, "ERROR: %s: %s\n", rd_kafka_err2str(err), - reason ? reason : ""); + } else { + INFO(1, "ERROR: %s: %s\n", rd_kafka_err2str(err), + reason ? reason : ""); + } }