I've seen the mosquitto_pub -h [server] -r -n -t [XYZ]
syntax for clearing out one off messages. My problem is the device developers have posted a lot of garbage messages.
I have a Java/Paho code base that I'd like to modify to do this automatically as needed, but I can't seem to publish a zero byte message. I tried
client.publish(topic,null);
...but that didn't seem to work.
Any suggestions on how to delete everything, en mass?
mosquitto_sub -t '#' --remove-retained --retained-only
. See also: mosquitto.org/man/mosquitto_sub-1.html – rel