2
votes

I am pretty new to kafka and want to understand how the quota system works for kafka.

Till now I have been following the document here

I have been able to set the quotas (produce and consume) for new clients using the following command

bin/kafka-configs.sh --zookeeper 10.11.10.2:2181 --alter --add-config 'producer_byte_rate=1024,consumer_byte_rate=1024' --entity-type clients --entity-name clientA

I am also using the following command to measure the throughput of Kafka topics

bin/kafka-producer-perf-test.sh --topic topic1 --num-records 100000 --record-size 100000 --throughput 500000 --producer-props acks=0 bootstrap.servers=10.11.10.2:9092

Now I am not sure how to assign a client-id for a particular producer. Basically I want to run the kafka-producer-perf-test with a particular client id.

Is it possible to do this. Also what is the difference between the user-quota and client-quota? Can I assign user-id to a particular producer?

1

1 Answers

1
votes

As per the source code of kafka.tools.ProducerPerformance being called by kafka-producer-test.sh, the "client.id" is hard-coded (at least in version 0.10 and earlier) using "producer-performance". You would have to set the quota for that particular client if you run kafka-producer-perf-test script.