I'm using Kafka to distribute load between my AI agents but my servers have different configurations and different rates for processing the input data, a few of them remain mostly idle while others lag behind.
it's because right now Kafka's algorithms assign equal number of partitions to each consumer, for example if my topic has 4 partitions and I have 2 consumers each one subscribes to 2 partitions. I know I can assign consumers to specific partitions but I don't want to limit my configurations to that extent.
is there a way to set a limit for how many partitions a consumer can subscribe to without specifying which partitions exactly?
my consumer is implemented using kafka-python==2.0.2
.
EDIT: as OneCrecketeer kindly mentioned, there is no guarantee that equal partitions will be assigned to each consumer.