StephenSorriaux / ansible-kafka-admin

Manage your topic's configuration (partitions, replication factor, parameters), ACLs, quotas, users and get stats, without any effort with this library. It does not use the Kafka scripts and does not require ssh connection to the remote broker.
Apache License 2.0
150 stars 46 forks source link

Add quotas management for KRaft-based clusters #159

Closed andr1an closed 1 year ago

andr1an commented 1 year ago

Quotas setup is supported in KRaft mode, you can use kafka-configs script for it, i.e.:

./bin/kafka-configs.sh \
  --bootstrap-server localhost:9092 --command-config ./config/kafka-admin-tools.properties \
  --alter --add-config producer_byte_rate=1024,request_percentage=50 \
  --entity-type users --entity-name myproducer 

But kafka_quotas module does not work without specifying Zookeeper-related arguments.

ryarnyah commented 1 year ago

Did you set api_version > 2.6.0? (i use it with KRaft cluster and there's no problem with it)

andr1an commented 1 year ago

Thank you @ryarnyah, worked! I've just set api_version: 3.6.0, same as Kafka version I'm using.