Catch and log exceptions coming from the dumpMetadata() call

Fixes #23
This commit is contained in:
R. Tyler Croy 2015-03-22 11:08:40 -07:00
parent 3a9caa2535
commit f053d9b68c
1 changed files with 6 additions and 1 deletions

View File

@ -55,7 +55,12 @@ class KafkaPoller extends Thread {
* topics that we should keep an eye on
*/
if (this.currentTopics.size() > 0) {
dumpMetadata()
try {
dumpMetadata()
}
catch (Exception ex) {
logger.error("Failed to fetch and dump Kafka metadata", ex)
}
}
Thread.sleep(POLLER_DELAY)