Working with more than one mqtt broker?


I'm using the default built-in mqtt nodes. It works great with a single mqtt broker.

However, I have different buildings and each has its own local MQTT broker. Some of the messages should replicate between different mqtt brokers. So, I generated a flow which connects to one mqtt broker as a subscriber and to another broker as a publisher. The idea was simple enough.

Well, it seems the mqtt nodes can only use one broker at a time. So, when I setup the publisher node with another broker, all mqtt nodes start to use this broker (even the one that used a correct broker as a subscriber before)...

Am I missing something? Can we call it a bug? Is there a way to setup multiple mqtt brokers?


The broker field in the Mqtt nodes is a select box. The bottom entry in that list is 'add new'. Select that option then click the pencil button. That will add a new broker-configuration node.

1 Like

Thanks again, knolleary....

You can automatically bridge mqtt servers (mosquitto at least) so that specified topics are automatically propagated to other servers. It is trivial to setup.

Agreed, Colin, however with Node Red I can manipulate messages while passing through...

Ah well, that wasn't in the system specification you defined earlier :slight_smile:

Indeed, my fault :innocent: :innocent: :innocent: :crazy_face: :crazy_face: :crazy_face: