> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/build/mqtt.md).

# Publish with MQTT in Duaer

In Duaer, MQTT publishes to a topic. Topic is required. Send Input Data is on by default. You need an mqtt credential.
## Publish a message

1. Create an mqtt credential.
2. Search for MQTT, connect it after the previous node, and select that credential.
3. Set Topic.
4. With Send Input Data on, the current item is the payload. Turn it off to set Message instead.
5. Select Execute step.

QoS under Options defaults to 0. Retain defaults to off.

To subscribe, use MQTT Trigger when that trigger is available on the instance.
## Questions

### Does the MQTT node in Duaer subscribe to topics?

This node only publishes. Use MQTT Trigger to subscribe.

## Related

- [Publish with AMQP Sender in Duaer](https://doc.duaer.com/build/amqp.md)
- [Read and write Redis in Duaer](https://doc.duaer.com/build/redis.md)
- [Call an API with HTTP Request in Duaer](https://doc.duaer.com/build/http-request.md)

