Closed dmitry-saritasa closed 8 months ago
This sounds like a pykafka
bug rather than a kazoo
bug. Can you please report it to them?
As an aside, since you are using Kafka >= 0.9, I strongly recommend switching to using a kafka client that leverages Kafka's built-in consumer group APIs rather than Zookeeper for consumer group coordination. For pykafka
, that'd be the ManagedBalancedConsumer
rather than the BalancedConsumer
that you're using. In kafka-python
, that'd be the new KafkaConsumer
rather than the old SimpleConsumer
.
ops:
Now I run the following python code in two different tmux panels:
first run - no problem second run in a different panel or window or terminal
I'm getting the following traceback:
python consumer.py
I'm using Fedora 25 / Python 3.5.2
So this is my screenshot: http://pasteboard.co/N6Gai2T8A.jpg It seems that first run of the script and balancedconsumer - gets all partitions managed. The second run doesn't spawn rebalancing for partitions and when I submit simple producer - all messages displayed by a connected consumer.
If however I use a different GROUP name - then both instances of the script continue to run and display exactly the same messages as shown here