Publish all LWTs when bridge goes down?

I have the following setup:

┌────────┐   ┌─────────────┐   ┌─────────────┐   ┌────────┐
│ Node A ├──►│ Mosquitto A │◄──┤ Mosquitto B │◄──┤ Node B │
└────────┘   └─────────────┘   └─────────────┘   └────────┘

The arrows indicate the connection direction, so the bridge config is on Mosquitto B.

I noticed that when Mosquitto A goes down, of course the LWT message of Node A will not be published to Node B. This totally makes sense, but it means that Node B will not be properly notified that Node A is unavailable now.

Is there a standard solution to this issue?

I was thinking Mosquitto A could relay all registered LWT messages to Mosquitto B to publish them if Mosquitto A goes down, but that would also mean birth messages would have to be repeated when it comes back. I don’t even know if birth message are specifically flagged as such on the MQTT level?

Hi Andre,

in general a LWT is a message defined by a client inside his broker, which will be sent, if the client is disconnected. The bridge is simply a replication of part of the messages from one broker to the other once the message are send. So broker B in your case does not know anything about the Client A. It does not even know the Client A exists. This kind of abstraction is part of the general MQTT protocol.
Unfortunately this is where the transparency between multiple brokers (to handle them like a single broker from the client perspective) currently ends.

The only feature available right now which might help you is the notification options of bridge configuration. This way your client Node B could detect the bridge connection between the two brokers is down.

Don’t know what you mean with birth message in detail (maybe you mean the birth message specified in Sparkplug ?). But as I wrote right now the LWT of all clients connected to A are not replicated to Broker B. And would not be straight forward from the technical perspective as a bridge is a single client connection in B. And a single client connection cannot have multiple LWT. I am not sure myself how the Sparkplug concepts deal with a hierarchy of brokers in general.