使用JMeter测试MQTT客户端 [英] Testing a MQTT Client using JMeter

查看:629
本文介绍了使用JMeter测试MQTT客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要加载测试,为移动客户端提供Web套接字J2EE应用程序.移动客户端使用基于Web套接字协议的MQTT.列出功能:

I need to load test, web socket J2EE Application serving mobile client. The mobile client uses MQTT over web socket protocol. Listing down the features :

i)移动客户端连接到Web套接字端点. ii)因此,它随后以MQTT数据包的形式发送二进制数据.

i) The mobile client connects to the web socket end point. ii) Hence forth it then send the binary data in MQTT packets.

正在对JMeter进行负载测试.使用以下JMeter插件. https://github.com/tuanhiep/mqttjmeter

Looking at JMeter to load test it. Using the following JMeter plugin. https://github.com/tuanhiep/mqttjmeter

我使用MQTT Connect采样器并将协议更改为"ws",并将端口更改为"8080".当我尝试连接时,看不到任何标准的websocket请求正在发送. Tomcat(J2EE服务器)发送502状态代码.

I use the MQTT Connect sampler and change the protocol to 'ws' and port to '8080'. When I try to connect, I do not see any standard websocket request being sent. Tomcat (J2EE Server) send a 502 status code.

在这方面的任何帮助将不胜感激.

Any help in this regard will be highly appreciated.

推荐答案

此插件正在使用 fusesource mqtt客户端库支持TCP,最终支持 SSL和TLS协议,您将无法通过此插件使用WebSocket传输对MQTT代理进行负载测试

This plugin is using fusesource mqtt client library under the hood which supports TCP and eventually SSL and TLS protocols, you won't be able to load test your MQTT broker using WebSocket transport with this plugin

考虑切换到 JMeter WebSocket采样器,一旦建立连接,您将能够发送您的移动客户端正在发送的任何有效载荷.

Consider switching to JMeter WebSocket Samplers, once you establish the connection you will be able to send whatever payload your mobile clients are sending.

更多信息: JMeter WebSocket采样器-实用指南

这篇关于使用JMeter测试MQTT客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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