Please support two or more brokers for mqtt integration

It will be nice to have two or more hosts for mqtt brokers, because another smart home system has its own broker. Also I would like to have my own broker. Another reason - I would have many brokers for responsibility separation, in case of failure one brocker, I will have some emergency alarms on another.

An MQTT client (like Home Assistant) can only connect to one MQTT broker at a time.

If you want one broker to share data with another, you can bridge them.

I know about bridges, it is not a solution, because sometimes you don’t have control for broker. (Broker is part of sputhub smart home system)

Problem is that a MQTT client can only connect to 1 broker at once.
Its more a design fault / lock in from Sputhub that is the problem. Not the other way around.

Then you will have a challenging time to make use of multiple brokers because a client can only connect to one of them at a time.

It seems to me that HA has already become more than just one client. It became the orchestrator of other systems. And why not have multiple mqtt integrations? But on the other hand, I understand that if mqtt integration uses a library in Python, it maybe a Singleton inside library and two clients cannot be created. In general, you shouldn’t create any Singletons in HA. It is even advisable to ensure that the integrations can work with several Lan networks at the same time, so that a device with HA has several Lan ports. The same applies to HomeKit, why HA can’t be connected to two different networks, each network to have its own HomeKit devices? If you build HA on such an architecture, then restrictions on the number of devices in networks will be removed.

This post is about the only thing I find on that subject with Google. Must be pretty small If there isn’t even links to buy it out there.

Connecting HA to multiple MQTT Brokers.
WTH- why can't I setup 2 (or even more) MQTT brokers?.
Local AND remote MQTT broker?.
Mossquitto get data from another MQTT Broker - lollipop camera.
What is the preferred MQTT setup?.
Here’s an external hardware vendor setting up a bridge between HA and themselves, the complete set-up… Home Assistant broker setup with SolarAssistant.

For more info on the same topic. All pretty much say the same thing. Multiple MQTT brokers running on the same server is pointless because you can bridge them together in very granular ways, there is no point to it.

It is here https://spruthub.ru/ but use Google translate, mqtt is not very important for them, they mainly provide data as HomeKit devices, so mqtt is not a priority

This may be just bad translation, but you do not seem to grasp what a broker is.
Its not a server filled with devices or their data. Its just a point at which everyone speaks the same language following a set of preset rules.

This means that Brand X can speak with Brand Y. Each of the brands have their own internal language and wouldnt understand each other without MQTT. Much like KNX and other communication protocols.

And restrictions? Its designed to handle many connections. 2k to 50k easily, just check out the many open source brokers. Some even in the millions using multiple nodes.

The network you can scale and setup multiple failsafes to be able to connect to that broker. Also HA isnt a client, the MQTT client integration is.

Failure may occur not because of the load, but because of the hardware. For example, I have a server disk on HA; I have not such a reliable disk for a broker, and another computer. Therefore, why create an extra point of failure if you can simply support several brokers. Let’s continue in topic already created, I did not see any obstacles in it, except for unique identifiers. But the last message was written a long time ago, perhaps when switching from yaml to config flow everything changed

What installation type are you running?

If it’s not HAOS you could just spool up a docker on that system or run a native linux copy of another broker…

Aside from that, you know that the broker is the add-on, not HA. HA is just another client and that client can only talk to 1 broker. A Broker is a Broker. I have all kinds of stuff connecting to my Broker running in the add-on that has absolutely nothing to do with HA. HA is not subscribed to those topics, so it doesn’t care.
Z2M has a set of topics it uses to talk to HA that it publishes. I also have a second set of topics publishing from Z2M that have nothing to do with HA. Tasmota does the same thing. Just tell your other software that broker info, make sure the add-on has the passwords set-up and what-not, and go.
As long as the topics don’t overlap, you are good to go.

Sorry, but that just reads as: i have a crap car. So instead of buying a good reliable one. I’ll just buy multiple crap ones so i can switch cars when 1 fails :sweat_smile:

You also quoted me but then ignored what i said. And marking that as the solution?

Anyway, gl with your request :wave:

Closing as solved as this is not how mqtt works and will not be implemented.

3 Likes