The open-source script of the Kafka client can be used for Kafka producer and consumer performance testing. Test results are displayed mainly based on the size of messages sent per second (MB/second) and the number of messages sent per second (records/second).
$KAFKA_HOME/bin/kafka-producer-perf-test.sh
$KAFKA_HOME/bin/kafka-consumer-perf-test.sh
Note:The
ckafka vip:vport
in the following sample commands should be replaced by the actual IP and port assigned for your instance.
Sample command for production testing:
bin/kafka-producer-perf-test.sh
--topic test
--num-records 123
--record-size 1000
--producer-props bootstrap.servers= ckafka vip : port
--throughput 20000
Sample command for consumption testing:
bin/kafka-consumer-perf-test.sh
--topic test
--new-consumer
--fetch-size 10000
--messages 1000
--broker-list bootstrap.servers=ckafka vip : port
Was this page helpful?