I have successfully configured a RabbitMQ cluster that supports MQTT through the MQTT plugin. At the moment, MQTT messages are exchanging a topic that is tied to a work queue. Thus, all MQTT messages are stored in this work queue.
Now I want to check the input performance of this cluster by examining the graphs in the RabbitMQ management plugin. My plan was to create 2 NodeJS MQTT publishers canceling many MQTT messages in a for loop, but that fails.
When the for loop runs more than 3,000 times, not all messages survive ... (Find my test code below). I would like to receive your opinion on this subject:
- What could be the reason the messages do not survive?
- What is the best way to evaluate the performance of RabbitMQ / MQTT?
- Should I use multiple publishers?
code:
var quantity = 3000; var mqtt = require('mqtt'); var options = { host: 'localhost', port: 1883, protocolId: 'MQIsdp', rejectUnauthorized: false, protocolId: 'MQIsdp', protocolVersion: 3 }; var client = mqtt.connect(options); for(var x=0; x<quantity; x++) { client.publish('/WSN/N536,563E/dynamic',"22"); console.log(x); } client.end();
source share