Open kkpapa opened 8 years ago
we set the number of consumer_threads for the kafka input so that (num_processes * num_consumer_threads) == num_partitions. That is, in your case set the number of threads to 8. Each thread will read from a single partition.
this should be fixed in the latest release. have you tried upgrading to the latest version of logstash-input-kafka
?
I'm using logstash2.1(logstash-2.1.1-1.noarch.rmp). I hit a issue about the balancing between consumer threads of multiple logstash instance. I have 1 topic with 24 partitions, 3 logstash instances to consume this topic. The kafka input config on each logstash instance is:
However, I found the topic was consumed not evenly from Kafka:
host1 consumed 8 partitions, but host2 consumed 12 partitions, it should be 8 partitions. So host3 could only consume 4 partitions. We could also see that the additional 4 partitions consumed by host2 have many messages lagged behind.
Any idea to balance consumers across multiple hosts?
Thanks, Kenny