Skip to content

Commit

Permalink
Make ALL_BROKERS_DOWN a non fatal error
Browse files Browse the repository at this point in the history
Signed-off-by: Etienne Champetier <[email protected]>
  • Loading branch information
champtar committed Mar 13, 2017
1 parent f416dec commit a1e0eaa
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions kafkacat.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 : "");
}
}


Expand Down

0 comments on commit a1e0eaa

Please sign in to comment.