Testing a MQTT Client using JMeter

≯℡__Kan透↙ 提交于 2021-01-29 15:34:38

问题


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) The mobile client connects to the web socket end point. ii) Hence forth it then send the binary data in MQTT packets.

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

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.


回答1:


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

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

More information: JMeter WebSocket Samplers - A Practical Guide



来源:https://stackoverflow.com/questions/65181976/testing-a-mqtt-client-using-jmeter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!