Subscribing to an MQTT topic
- Open Node-RED.
- Add an mqtt node from the input category to the workspace.
- Double-click the mqtt node to open the Edit node dialogue.
- In the Server drop-down list, select a server to connect to or add a new MQTT broker.
- In the Topic text box, enter the topic you want the node to subscribe to.

Use / as hierarchy separator. You can use MQTT wildcards: + for one level, # for multiple levels.
- In the QoS drop-down lists, select the Quality of Service level of the respective message. Choose from:
- 0 (fire and forget): Arrival of the message solely relies on the underlying Internet Protocol network. Message loss may occur.
- 1 (at least once): The message is assured to arrive, but may arrive more than once.
- Click Done to apply your changes.
- Add more nodes to the workspace and connect them to a flow with the mqtt node being the first node.
- Once you deploy the flow, the mqtt node injects messages of the selected topic into the flow.