Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complain if # kafka consumers exceeds # partitions #475

Open
manishapme opened this issue Jul 28, 2020 · 1 comment
Open

Complain if # kafka consumers exceeds # partitions #475

manishapme opened this issue Jul 28, 2020 · 1 comment
Labels
good starter A good place to start devving on baseplate.py sharp edge

Comments

@manishapme
Copy link
Contributor

It is quite easy for someone who is not familiar with kafka to think more consumers are better. However, if you run more consumers than there are partitions, they will never process any messages. see if we can get baseplate to complain loudly if the number of consumers exceeds the partitions on a topic.

@spladug spladug added good starter A good place to start devving on baseplate.py sharp edge labels Nov 10, 2020
@jramirez857
Copy link

Hi, I am interested in taking this on if it is available!

My proposed change would go in kafka.py:BaseKafkaQueueConsumerFactory:make_kafka_consumer. What I'd like to do is iterate through the topics in ClusterMetadata and check the number of partitions in each TopicMetadata. Then, the number of partitions on the topic can be compared to the number of Consumers currently listening to the topic. If the number of Consumers is equal to the number of partitions, we will throw an error when creating the consumer.

A question I have is whether consumers are using group functionality? I ask because if this is the case I could use the confluent_kafka AdminClient to list the consumer groups and then find each consumer that is a member of the group.

I hope this makes sense and appreciate any insight you can provide. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good starter A good place to start devving on baseplate.py sharp edge
Development

No branches or pull requests

3 participants