rabbitmq 压力测试

来源:本站原创 IT必备工具 超过319 views围观 0条评论

https://github.com/rabbitmq/rabbitmq-perf-test/releases

RabbitMQ Performance Testing Tool 介绍:
https://www.rabbitmq.com/java-tools.html

 

./runjava com.rabbitmq.perf.PerfTest -x 1 -y 2 -u "ACCOUNT_LOCK" -a –id "test 1"

Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED – inequivalent arg ‘durable’ for queue ‘ACCOUNT_LOCK’ in vhost ‘/’: received ‘false’ but current is ‘true’, class-id=50, method-id=10)

bin/runjava com.rabbitmq.perf.PerfTest -x 100  -u "ss"  –id "test 1" 

100生产者,且不自动确认

更多帮助:

> runjava com.rabbitmq.perf.PerfTest –help
usage: <program>
-?,–help                         show usage
-A,–multiAckEvery <arg>          multi ack every
-a,–autoack                      auto ack
-b,–heartbeat <arg>              heartbeat interval
-C,–pmessages <arg>              producer message count
-c,–confirm <arg>                max unconfirmed publishes
-D,–cmessages <arg>              consumer message count
-d,–id <arg>                     test ID
-e,–exchange <arg>               exchange name
-f,–flag <arg>                   message flag
-h,–uri <arg>                    connection URI
-i,–interval <arg>               sampling interval in seconds
-K,–randomRoutingKey             use random routing key per message
-k,–routingKey <arg>             routing key
-M,–framemax <arg>               frame max
-m,–ptxsize <arg>                producer tx size
-n,–ctxsize <arg>                consumer tx size
-p,–predeclared                  allow use of predeclared objects
-Q,–globalQos <arg>              channel prefetch count
-q,–qos <arg>                    consumer prefetch count
-R,–consumerRate <arg>           consumer rate limit
-r,–rate <arg>                   producer rate limit
-s,–size <arg>                   message size in bytes
-t,–type <arg>                   exchange type
-u,–queue <arg>                  queue name
-X,–producerChannelCount <arg>   channels per producer
-x,–producers <arg>              producer count
-Y,–consumerChannelCount <arg>   channels per consumer
-y,–consumers <arg>              consumer count
-z,–time <arg>                   run duration in seconds (unlimited by default)

示例:100个生产者;100个消费者;echange名称为testex;转发类型为fanout;queue名称为testque;bingding为kk01;

runjava.bat com.rabbitmq.perf.PerfTest -x100 -y100 -e"testex" -t"fanout" -u"testque" -k"kk01"

文章出自:CCIE那点事 http://www.jdccie.com/ 版权所有。本站文章除注明出处外,皆为作者原创文章,可自由引用,但请注明来源。 禁止全文转载。
本文标题:rabbitmq 压力测试
本文链接:http://www.jdccie.com/?p=4015转载请注明转自CCIE那点事
如果喜欢:点此订阅本站
  • 相关文章
  • 为您推荐
  • 各种观点