如何对RabbitMQ服务器进行负载测试(使用JMeter,python或任何其他工具.)? [英] How do I load test a RabbitMQ server (Either using JMeter, python or any other tool..)?

查看:497
本文介绍了如何对RabbitMQ服务器进行负载测试(使用JMeter,python或任何其他工具.)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

已被授予访问RabbitMQ服务器的权限,以便对其进行负载测试.我对服务器和AMQ协议是完全陌生的.我一直在网上进行调查,以了解有哪些不同的方法.到目前为止,我正在研究两种方法.

I have been given access to a RabbitMQ server to do a load test on it. I'm completely new to servers and AMQ protocol. I've been researching online to see what are some different methods. So far I'm investigating two methods.

  1. JMeter;我找到了这个项目: https://github.com/jlavallee/JMeter- Rabbit-AMQP#build-dependencies .它给了我一个jar文件,可以创建JMeter AMQP使用者和发布者,但是我不知道该在字段中输入什么内容. (虚拟主机vs主机-不知道我的端口-..)

  1. JMeter; I have found this project: https://github.com/jlavallee/JMeter-Rabbit-AMQP#build-dependencies . It gives me a jar file which I can create JMeter AMQP consumer and publisher, but I have no idea what to put in the fields. (virtual host vs host - dunno my ports -..)

Python;使用皮卡. 我有一个简单的发件人脚本,该脚本从客户端连接到服务器,然后向服务器发送"hello world"文本.还写了一个接收者脚本来接收那些"hello world".如果我同时打开多个终端并同时运行发件人脚本10个实例,这是否可以确定负载?

Python; using Pika. I have a simple sender script which connects from my client to my server and sends a 'hello world' text to the server. Also wrote a receiver script to receive those 'hello world's. Is this a determination of load if I open multiple terminals and run my sender script 10 instances at the same time?

我再次问所有这些问题,因为我是服务器,云,负载测试和Jmeter的新手.这只是我要做的任务.

Again, I'm asking all these because I'm new to servers, cloud, load testing and Jmeter. It's just a task I have to do.

谢谢您的回答,可以给我一些澄清.

Thanks for any answer you can give me to clarify things a bit for me.

推荐答案

您可以使用Rabbitmq的Java客户端工具:
https://www.rabbitmq.com/java-client.html

You can use rabbitmq's Java Client Tools:
https://www.rabbitmq.com/java-client.html

它带有PerfTest:
https://www.rabbitmq.com/java-tools.html

It comes with a PerfTest:
https://www.rabbitmq.com/java-tools.html

您可以使用以下命令运行它:

You can run it using this command:

./runjava.sh com.rabbitmq.examples.PerfTest \
-h amqp://<user>:<password>@<host>:<port>/<vhost> \
-x <number_of_producers> \
-y <number_of_consumers> \
-s <message_size> \
-C <total_number_of_message> \
-u <queue_name>

如果您查看文档或源代码,也可以使用其他标志.

There are other flags you can use too if you look at the documentation or the source you can see what they are.

更新/无耻插头
我写了一个Web应用程序,将这些工具放在一个地方 https://github.com/johnlonganecker/rabbitmq -performance-app

Update/Shameless Plug
I wrote a web app that pulls these tools into one place https://github.com/johnlonganecker/rabbitmq-performance-app

这篇关于如何对RabbitMQ服务器进行负载测试(使用JMeter,python或任何其他工具.)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆