kafka 自带的压测工具 kafka-producer-perf-test.sh 和 kafka-consumer-perf-test.sh
./bin/kafka-producer-perf-test.sh --topic kafka-test --num-records 10000 --record-size 1024 --throughput -1 --producer-props bootstrap.servers=10.206.16.18:9092 compression.type=lz4
./bin/kafka-consumer-perf-test.sh --broker-list 10.206.16.18:9092 --topic kafka-test --messages 10000000 --threads 8 --reporting-interval 1000
参考:
https://blog.csdn.net/hyunbar/article/details/106991455