Reputation: 5880
I'd like to set quota for each Producer and Consumer. For example the following command to set the quotas:
./kafka-configs.sh --zookeeper localhost:2181
--alter --add-config 'producer_byte_rate=1048,consumer_byte_rate=2097'
--entity-name test-client --entity-type clients
my question is that: how can I get the entity-name? because right now there are hundreds of producers and consumers are using Kafka, but I don't know their ids/names.
Upvotes: 1
Views: 1978
Reputation: 26875
You can use --entity-default
to apply the quota to all client-ids. This is mentioned in the Setting quotas section in the documentation:
It is possible to set default quotas for each (user, client-id), user or client-id group by specifying --entity-default option instead of --entity-name.
Your command would be:
./kafka-configs.sh --zookeeper localhost:2181
--alter --add-config 'producer_byte_rate=1048,consumer_byte_rate=2097'
--entity-default --entity-type clients
Upvotes: 2