Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Is it possible to force the broker to disconnect?

I have a mosquitto broker configured as a bridge with 2 remote bridges configured, for example:

 

connection foo

address 192.0.2.1:1883 198.51.100.1:1883

round_robin true

cleansession true

bridge_protocol_version mqttv311

start_type automatic

try_private true

 

The first remote bridge (192.0.2.1) serves as the primary connection and the second remote bridge (198.51.100.1) serves as a backup connection.  (Unfortunately, I’m currently forced to use “round_robin true” due to issue #481[1].)  Each remote bridge is reachable via a separate interface, so let’s say 192.0.2.1 is reachable via eth0 and 198.51.100.1 is reachable via eth1.  If the eth0 Ethernet cable is disconnected, nothing happens for quite some time until some connection or idle timer expires, I presume.  But in such a scenario as this, I would like for the broker to immediately failover to the 198.51.100.1 bridge connection.

 

Is there a way to force the broker to terminate its current connection so that it can more quickly failover to the next one?  Perhaps there’s a $SYS/broker/control/disconnect topic of sorts that I could publish to in order to force a disconnect?  Or perhaps there’s a topic that one could publish to in order to cause whatever timer is running to immediately expire so the connection can be disconnected that way?  I’m open to other ideas if anyone can suggest something that would essentially accomplish the desired goal.

 

Well, I assume nothing like this exists today.  Do others think it would be useful to add some “$SYS/broker/control/” topics to allow the manipulation of the broker such as forcing a disconnect as I’ve described?  I was going to open an enhancement bug request for this, but since I’m fairly new to mosquitto and MQTT in general, I thought I would try to solicit some feedback first before I do.

 

Thanks.

- Chris

 

[1]: https://github.com/eclipse/mosquitto/issues/481

 

CONFIDENTIALITY NOTICE: This message is the property of International Game Technology PLC and/or its subsidiaries and may contain proprietary, confidential or trade secret information.  This message is intended solely for the use of the addressee.  If you are not the intended recipient and have received this message in error, please delete this message from your system. Any unauthorized reading, distribution, copying, or other use of this message or its attachments is strictly prohibited.


Back to the top