1. 程式人生 > >RabbitMQ Performance Testing Tool 效能測試工具

RabbitMQ Performance Testing Tool 效能測試工具

解壓檔案(放到 RabbitMQ 安裝目錄下)
rabbitmq-perf-test-1.1.0.zip

測試(命令列執行):

> cd D:\Program Files\RabbitMQ Server\rabbitmq-perf-test-1.1.0\bin
> runjava.bat com.rabbitmq.perf.PerfTest -a

更多幫助:
> 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名稱為testquebingding為kk01;
runjava.bat com.rabbitmq.perf.PerfTest -x100 -y100 -e"testex" -t"fanout" -u"testque" -k"kk01"

結合 rabbitmq-management介面工具檢視,和了解訊息收發情況(參考:RabbitMQ 在windows中安裝