From b6bbcf92a4240f5c77f2d3145f73b42ec229cb5a Mon Sep 17 00:00:00 2001 From: "R. Tyler Croy" Date: Fri, 14 Aug 2015 15:11:16 -0700 Subject: [PATCH] Don't reconnect if we have invalid data in our brokerConsumerMap, just warn about it Fixes #30 --- .../groovy/com/github/lookout/verspaetung/KafkaPoller.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/groovy/com/github/lookout/verspaetung/KafkaPoller.groovy b/src/main/groovy/com/github/lookout/verspaetung/KafkaPoller.groovy index 09995b2..45acaaa 100644 --- a/src/main/groovy/com/github/lookout/verspaetung/KafkaPoller.groovy +++ b/src/main/groovy/com/github/lookout/verspaetung/KafkaPoller.groovy @@ -117,10 +117,10 @@ class KafkaPoller extends Thread { SimpleConsumer consumer = this.brokerConsumerMap[leaderId] /* If we don't have a proper SimpleConsumer instance (e.g. null) then - * we should reconnect on our next time around + * we might not have gotten valid data back from Zookeeper */ if (!(consumer instanceof SimpleConsumer)) { - this.shouldReconnect = true + logger.warn("Attempted to the leaderId: ${leaderId} (${topic}/${partition}") return 0 } TopicAndPartition topicAndPart = new TopicAndPartition(topic, partition)