MQTT


mqtt-in

graph TD; A[mqtt] --> B[debug]; B --> C(topic); B --> D(payload); B --> E(qos); B --> F(retain); B --> G(_topic); B --> H(_msgid);

You can trigger the mqtt in node, via the following python script,


import paho.mqtt.client as mqtt
client = mqtt.Client('0')
client.connect('localhost',1883)
result = client.publish('test','hi')
    

mqtt-out

graph LR; A[inject] --> B[function]; B --> C[mqtt-out];
function node
 
msg = {
    payload:"I am Leo",
    topic:"Warnings",
    body:"I am warning you."
};
return msg;
    
mqtt-out node
 
Server: localhost:1883
Topic: test
    

Now if you click inject, it will trigger a signal from mqtt-out. The mqtt-in node should receive the message.

References