{"id":1554,"date":"2019-04-24T10:58:59","date_gmt":"2019-04-24T09:58:59","guid":{"rendered":"https:\/\/ofalcao.pt\/blog\/?p=1554"},"modified":"2019-04-24T10:58:59","modified_gmt":"2019-04-24T09:58:59","slug":"clearing-mqtt-retained-messages","status":"publish","type":"post","link":"https:\/\/ofalcao.pt\/blog\/2019\/clearing-mqtt-retained-messages","title":{"rendered":"Clearing MQTT retained messages"},"content":{"rendered":"\n<p>When using your own &#8216;mosquitto&#8217; broker and things start to get weird, ghost messages being received as soon as you start subscribing&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo service mosquitto start<br>sudo rm \/var\/lib\/mosquitto\/mosquitto.db<br>sudo service mosquitto start<\/pre>\n\n\n\n<p>This will crear your retained messages. Next time be careful with option &#8220;retain message&#8221; when playing with MQTT Dashboards&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>When using your own &#8216;mosquitto&#8217; broker and things start to get weird, ghost messages being received as soon as you start subscribing&#8230; sudo service mosquitto startsudo rm \/var\/lib\/mosquitto\/mosquitto.dbsudo service mosquitto start This will crear your retained messages. Next time be careful with option &#8220;retain message&#8221; when playing with MQTT Dashboards&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[1],"tags":[331],"series":[],"class_list":["post-1554","post","type-post","status-publish","format-standard","hentry","category-sem-categoria","tag-mqtt"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2Mhyv-p4","_links":{"self":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/comments?post=1554"}],"version-history":[{"count":0,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/posts\/1554\/revisions"}],"wp:attachment":[{"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/media?parent=1554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/categories?post=1554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/tags?post=1554"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/ofalcao.pt\/blog\/wp-json\/wp\/v2\/series?post=1554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}