Don't reconnect if we have invalid data in our brokerConsumerMap, just warn about it
Fixes #30
This commit is contained in:
parent
be33333bfa
commit
b6bbcf92a4
|
@ -117,10 +117,10 @@ class KafkaPoller extends Thread {
|
||||||
SimpleConsumer consumer = this.brokerConsumerMap[leaderId]
|
SimpleConsumer consumer = this.brokerConsumerMap[leaderId]
|
||||||
|
|
||||||
/* If we don't have a proper SimpleConsumer instance (e.g. null) then
|
/* 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)) {
|
if (!(consumer instanceof SimpleConsumer)) {
|
||||||
this.shouldReconnect = true
|
logger.warn("Attempted to the leaderId: ${leaderId} (${topic}/${partition}")
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
TopicAndPartition topicAndPart = new TopicAndPartition(topic, partition)
|
TopicAndPartition topicAndPart = new TopicAndPartition(topic, partition)
|
||||||
|
|
Loading…
Reference in New Issue