Force LWT when a failure occurs

I have node-red connected to a server (via TCP) that is providing data for several measurement points. Node-red is responsible for translating the data from the server into an MQTT message and sending this to a MQTT server. The server will at some point fail and node-red can get a failure of the TCP link (or at least I think the the catch will get it). When that happens I want to be able to tell the MQTT broker to send LWT messages. Is there a way to tell the MQTT out node to fail?

Welcome to the forum @garybia

There is nothing to stop you sending whatever message you have configured LWT for at any time you like.

1 Like

Thanks Colin. Was kind of a "duh?" moment I guess. That saves me configuring a last will for each end point which I was trying to avoid.