← Back to team overview

mosquitto-users team mailing list archive

Re: Mosquitto Internal flush

 

Yeah, I know it is still possible to clear all the retained data by publishing with no payload... 
But to do that I need to store somewhere all the topics I need to clear (using the Mosquitto plugin probably) and then send all the publish requests to the broker. It's quiet a heavy way to just perform a cleanup.

Remi

-----Message d'origine-----
De : Mosquitto-users [mailto:mosquitto-users-bounces+remi.salembier=niji.fr@xxxxxxxxxxxxxxxxxxx] De la part de Jan-Piet Mens
Envoyé : jeudi 28 novembre 2013 17:16
À : mosquitto-users@xxxxxxxxxxxxxxxxxxx
Objet : Re: [Mosquitto-users] Mosquitto Internal flush

Hello,

> Are there any other options or anything planned to be able to make a proper cleanup ?

It works as designed :)

If you want to completely wipe the retained database (and therewith lose all retained publications) you can stop Mosquitto, rm its database, and restart it. (Not recommended.)

Otherwise, you can wipe an individual retained topic by publishing a NULL payload to that topic. mosquitto_pub has an option for doing that:

        mosquitto_pub -t topic -n -r

Hope that helps,

        -JP

--
Mailing list: https://launchpad.net/~mosquitto-users
Post to     : mosquitto-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~mosquitto-users
More help   : https://help.launchpad.net/ListHelp


Follow ups

References