Hello,
I've created a test case with NR to check how our broker can handle big quantities of data.
In flow bellow there are 10 flows each containing, 200 clients, every client sends 20topics.
I cannot copy paste all flows. so here is the sample part:
[{"id":"44a3b07ac9e44468","type":"subflow","name":"GenerateMessage","info":"","category":"","in":[{"x":100,"y":120,"wires":[{"id":"8ad30a3498d875b1"}]}],"out":[{"x":440,"y":60,"wires":[{"id":"8ad30a3498d875b1","port":0}]}],"env":[{"name":"IP","type":"str","value":"192.168.0.82"}],"meta":{},"color":"#DDAA99"},{"id":"69f649fe30b787d6","type":"mqtt out","z":"44a3b07ac9e44468","name":"","topic":"","qos":"2","retain":"","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"44a2b6db4f9d9282","x":670,"y":120,"wires":[]},{"id":"8ad30a3498d875b1","type":"function","z":"44a3b07ac9e44468","name":"","func":"num= msg.payload;\n\nfor (let i = 0; i < 20; i++) {\n msg.payload=\"Hello_Sub\"+i.toString();\n msg.topic = \"tgw/data/lika/\"+i.toString();\n node.send(msg);\n// return msg\n} \n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":120,"wires":[["69f649fe30b787d6"]]},{"id":"44a2b6db4f9d9282","type":"mqtt-broker","z":"44a3b07ac9e44468","name":"Emqx","broker":"${IP}","port":"1883","clientid":"","autoConnect":true,"usetls":false,"protocolVersion":"4","keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","birthMsg":{},"closeTopic":"","closeQos":"0","closePayload":"","closeMsg":{},"willTopic":"","willQos":"0","willPayload":"","willMsg":{},"sessionExpiry":""},{"id":"88370236fb6586b4","type":"inject","z":"dabcedc3b1e417af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"0.5","crontab":"","once":false,"onceDelay":0.1,"topic":"count","payload":"50","payloadType":"num","x":100,"y":100,"wires":[["7d830749219bf7b7"]]},{"id":"7d830749219bf7b7","type":"function","z":"dabcedc3b1e417af","name":"","func":"switch (msg.topic){\n case \"count\":\n var count = flow.get('count') || 0;\n count ++\n flow.set('count',count)\n if (count<=msg.payload){\n msg.payload = \"Count:\"+count.toString()\n node.status({text:count});\n node.send(msg)\n }\n break;\n \n case \"Reset\":\n count = 0;\n flow.set('count',count) \n // msg.payload = count;\n node.status({text:count});\n // return msg\n break;\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":120,"wires":[["1319f4fc81e4b6d9","3838ed7becc39972","6396444e59f3b26f","ba6e0aac211a76f5","a253e19d2534eae3","4ed33fcfb99920e1","20df8be1f4339ea9","7d8f9f464e274361","a431f443ae419580","b06ba81b4017e9e6","cc7c84f04046d29a"]]},{"id":"bb66ccfcfcf93772","type":"inject","z":"dabcedc3b1e417af","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"Reset","payload":"0","payloadType":"num","x":110,"y":140,"wires":[["7d830749219bf7b7"]]},{"id":"cc7c84f04046d29a","type":"link out","z":"dabcedc3b1e417af","name":"call","mode":"link","links":["8f0d4999f7e1e16c","27c534cd9ea95588","8765b5b5d4402e68","fdc0429e22c5a5f5","3db2f23b12a1d4c5","08edd9d884a58c67","9695754fa21c5f52","db6006b73c7e6015","07cf904ebf360c63"],"x":535,"y":80,"wires":[]},{"id":"1319f4fc81e4b6d9","type":"function","z":"dabcedc3b1e417af","name":"","func":"msg.payload=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":280,"y":180,"wires":[["0e796608280f77d2","34e209a8279cdd64","9379e6f2e794f844","1a0e8356b5d564e3","fe643e0b5ac15013","1b4f308e71800b30","663ee8d6bef13f34","091e87a3dfd5b6a2","86657e2dee198411","bd4e1a9fb9628f01","ef21a73d5aa0db19","f823872b97e701f6","608125ac7bb84629","fefd0f44445aad22","8ab0dc9b4adc6df4","411d6b98c6a77679","574103df7acf3245","1aceda39df938bc9","cfc5515e5d44e671","f19717774b97d80a"]]},{"id":"0e796608280f77d2","type":"subflow:44a3b07ac9e44468","z":"dabcedc3b1e417af","name":"","x":470,"y":160,"wires":[[]]}]
Strange thing is that everything works fine with QoS0 and QoS1, but when QoS2 is selected, it generates some number of message batches (Clients * Topics) and then stops sending the messages.
It starts generating at rate: 1-2 batches per second, counter goes up and messages keep coming to the broker. After 25-40 (in that range mostly, very rarely it manages to send everything) counter finishes remaining count in less than second and no messages arrive.
Bigger number of topics in every client, the faster it "breaks"
Any ideas why this situation only happens with QoS2?