I'll try though i am unsure how to provide that for you, ive copied the flow
Here you go:
[
{
"id": "55525a9d18c99b86",
"type": "tab",
"label": "test flow",
"disabled": false,
"info": "",
"env": []
},
{
"id": "23d57f61ddd34935",
"type": "mqtt in",
"z": "55525a9d18c99b86",
"name": "Broker node",
"topic": "",
"qos": "2",
"datatype": "auto",
"broker": "30454c673e913e36",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 1,
"x": 710,
"y": 160,
"wires": [
[]
]
},
{
"id": "e2b9ba3bf294a263",
"type": "function",
"z": "55525a9d18c99b86",
"name": "Connect to existing broker",
"func": "\nconst new_broker = {broker: \"192.168.0.100\", port: \"1883\", username: \"sub\", password: \"\", force: \"true\"};\n\nmsg.action = \"connect\";\nmsg.broker = new_broker;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 100,
"wires": [
[
"23d57f61ddd34935"
]
]
},
{
"id": "4639b22bf3c59f41",
"type": "inject",
"z": "55525a9d18c99b86",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 100,
"wires": [
[
"e2b9ba3bf294a263"
]
]
},
{
"id": "edfa1ec2bf2fc991",
"type": "function",
"z": "55525a9d18c99b86",
"name": "Connect to existing broker",
"func": "\nconst new_broker = {broker: \"192.168.0.101\", port: \"1883\", username: \"sub\", password: \"\", force: \"true\"};\n\nmsg.action = \"connect\";\nmsg.broker = new_broker;\n\nreturn msg;\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 450,
"y": 160,
"wires": [
[
"23d57f61ddd34935"
]
]
},
{
"id": "226b49c328f5063c",
"type": "function",
"z": "55525a9d18c99b86",
"name": "Connect to non existing broker",
"func": "\nconst new_broker = {broker: \"192.168.0.102\", port: \"1883\", username: \"sub\", password: \"\", force: \"true\"};\n\nmsg.action = \"connect\";\nmsg.broker = new_broker;\n\nreturn msg;",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 470,
"y": 220,
"wires": [
[
"23d57f61ddd34935"
]
]
},
{
"id": "dd21943b30072aef",
"type": "inject",
"z": "55525a9d18c99b86",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 160,
"wires": [
[
"edfa1ec2bf2fc991"
]
]
},
{
"id": "c1070b307f33bd89",
"type": "inject",
"z": "55525a9d18c99b86",
"name": "",
"props": [
{
"p": "payload"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"payload": "",
"payloadType": "date",
"x": 240,
"y": 220,
"wires": [
[
"226b49c328f5063c"
]
]
},
{
"id": "30454c673e913e36",
"type": "mqtt-broker",
"name": "",
"broker": "localhost",
"port": "",
"clientid": "",
"autoConnect": false,
"usetls": false,
"protocolVersion": "5",
"keepalive": "60",
"cleansession": true,
"birthTopic": "",
"birthQos": "0",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willPayload": "",
"willMsg": {},
"sessionExpiry": ""
}
]
![errrflow](https://global.discourse-cdn.com/business6/uploads/nodered/original/3X/e/6/e60d39c0d340196813a9e51adcdae9500b565672.png)
To replicate the issue; Press the injects for two existing brokers, you'll have to configure the dynamic information in the functions first. You can try to connect between two existing brokers and it should not be a problem, however if you connect to the third one (which shouldn't exist) then the connection to the other ones should start to get disconnected.