[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[mosquitto-dev] Bridging broker - local clients publishing before remote connection

My system has two apps which communicate with a remote broker [#2]. I'd like
them to appear there as the same Client ID, so I'm looking at having a local
bridging broker [#1] that they connect to, and that then relays the messages
to/from broker2.
I have it essentially configured, except for a problem most notably at
boot-up: the apps are able to connect to broker1 and therefore publish their
initial "I'm here" messages; but because the system's external networking
has not yet come up, broker1 has not yet connected to broker2 and so these
messages are lost.
Are there any config/topic tricks I can use to prevent this?  Either
'buffering' them somehow, or catching the moment at which the bridge
connects to broker2 (I do have the ability to signal the apps to reconnect
to broker1)
(Broker2 is AWS - hence disconnects on a QoS2 or Retained Msg)