fallback MQTT gateway
-
would it be somehow possible to change the MQTT gateway that it accepts a second broker IP in case connection to primary is lost?
I am trying to have my setup more reliable in case something brakes.
-
Did you ever implement this?
I had some thought along the lines of doing some failover or reverse proxy type setup on my LAN (or VPN / intranet if I eventually get to the point of multiple sites). But these have just been off the top of my head thoughts when thinking (apparently) along the same lines as you.
Curious to hear what others may have done though.
-
I didn't find a solution to this on gateway code. What I did and seems to be working more or less.
I have two instances running MQTT and OpenHAB. One is active, other is inactive. Both obviously do have separate IP addresses, however I have managed with "keepalive" to put a virtual IP in front. All I had to do was reflashing my gateway to the virtual IP.
So if one of the nodes is going down, the other one becomes the master and binds to the virtual IP.
In addition to have this seemless, the MQTT servers have a subscription to the other one. This solves the issue, that in case of a failure, there is no current data on that instance.
OpenHAB itself was always setup in a manner that I am able to run two instances (development and production) side by side and get updates on stats of all items.On hardware level, I run a server on Ubuntu with VirtualBox where the instances run. On top, I have another standy node running on a RasPi.
-
Interesting. Thanks for the explanation.
Suggested Topics
-
Controlling Blinds.com RF Dooya Motors with Arduino and Vera
My Project • 24 Mar 2014, 13:27 • petewill 12 Aug 2023, 16:39 -
"ZHNetwork" a esp-now based mesh network for ESP8266/ESP32 hardware
Feature Requests • 17 Mar 2023, 07:25 • graffiti 17 Mar 2023, 07:25 -
is there a solution for a relay with button that also works offline?
Feature Requests • 31 Mar 2023, 16:04 • Branther 4 Apr 2023, 11:37 -
ota-configuration
Feature Requests • 8 Mar 2023, 09:28 • pbw 8 Mar 2023, 09:28 -
Raspberry MQTT GW over TLS with rfm69
Feature Requests • 14 Sept 2022, 15:11 • Tico 16 Sept 2022, 07:23 -
ESP32 with builtin Ethernet as Gateway - f.e. WT32-ETH01
Feature Requests • 15 Mar 2023, 15:01 • gryzli133 15 Mar 2023, 21:25