# Can I input host,port,user,pass, topic to subscribe in MQTT node?

**URL:** <https://discourse.nodered.org/t/can-i-input-host-port-user-pass-topic-to-subscribe-in-mqtt-node/70876>\
**Category:** General\
**Tags:** function-node, mqtt\
**Created:** [19 November 2022 15:48 UTC](https://discourse.nodered.org/t/can-i-input-host-port-user-pass-topic-to-subscribe-in-mqtt-node/70876 "2022-11-19T15:48:58Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [19 November 2022 16:18 UTC](https://discourse.nodered.org/t/can-i-input-host-port-user-pass-topic-to-subscribe-in-mqtt-node/70876/3 "2022-11-19T16:18:17Z")

</div>

According to [this thread](https://discourse.nodered.org/t/dynamic-mqtt-nodes-actions-connect-guidance-needed/58878), all of the brokers you want to use have to be already set up, but in Dynamic mode you can use msg.action and properties of msg.broker to switch between them.

It does seem a little eccentric to have one mqtt broker per device, akin to having one CNN server per news story.

---

_[View the full topic](https://discourse.nodered.org/t/can-i-input-host-port-user-pass-topic-to-subscribe-in-mqtt-node/70876)._
