使用kafka安装后自带的脚本测试
1. download:
git clone --depth 1 git@github.com:apache/kafka.git
bin/kafka-producer-perf-test.sh --help
2. build:
./gradlew jar -PscalaVersion=2.13.12
3. producer-perf-test
bin/kafka-producer-perf-test.sh --topic __test-topic --num-records 20000 --record-size 500 --throughput -10 --producer-props bootstrap.servers=local:9094
4. consumer-perf-test:可以直接消费生产测试生成的消息
-- create producer: bin/kafka-console-producer.sh --broker-list local:9094 --topic __test-topic
bin/kafka-consumer-perf-test.sh --topic __test-topic --timeout 50000 --messages 20000 --fetch-size 1048576 --group test-group --bootstrap-server local:9094
评论列表,共 0 条评论
暂无评论