Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mosquitto-dev] last will from mosquitto_pub - how to get it sent out?

> mosquitto_pub -h -r -t testbench/willTest -m
> "stillAlive" -k 5 --will-topic testbench/willTest --will-payload
> "died" --will-retain

You are passing the payload on the command line (-m) and _pub will close
and finish correctly when it's sent that out.

Try a longer-lived _pub with, say, -l which reads from stdin; if you
kill mosquitto_pub it ought to publish the LWT.


Back to the top