{"action":"created","issue":{"url":"https://api.github.com/repos/eclipse/mosquitto/issues/1040","repository_url":"https://api.github.com/repos/eclipse/mosquitto","labels_url":"https://api.github.com/repos/eclipse/mosquitto/issues/1040/labels{/name}","comments_url":"https://api.github.com/repos/eclipse/mosquitto/issues/1040/comments","events_url":"https://api.github.com/repos/eclipse/mosquitto/issues/1040/events","html_url":"https://github.com/eclipse/mosquitto/issues/1040","id":381225855,"node_id":"MDU6SXNzdWUzODEyMjU4NTU=","number":1040,"title":"empty retained messages published while bridged brokers disconnected are not sent when reconnected","user":{"login":"giorver","id":45073355,"node_id":"MDQ6VXNlcjQ1MDczMzU1","avatar_url":"https://avatars1.githubusercontent.com/u/45073355?v=4","gravatar_id":"","url":"https://api.github.com/users/giorver","html_url":"https://github.com/giorver","followers_url":"https://api.github.com/users/giorver/followers","following_url":"https://api.github.com/users/giorver/following{/other_user}","gists_url":"https://api.github.com/users/giorver/gists{/gist_id}","starred_url":"https://api.github.com/users/giorver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorver/subscriptions","organizations_url":"https://api.github.com/users/giorver/orgs","repos_url":"https://api.github.com/users/giorver/repos","events_url":"https://api.github.com/users/giorver/events{/privacy}","received_events_url":"https://api.github.com/users/giorver/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/eclipse/mosquitto/milestones/13","html_url":"https://github.com/eclipse/mosquitto/milestone/13","labels_url":"https://api.github.com/repos/eclipse/mosquitto/milestones/13/labels","id":3809671,"node_id":"MDk6TWlsZXN0b25lMzgwOTY3MQ==","number":13,"title":"1.5.5","description":"","creator":{"login":"ralight","id":79578,"node_id":"MDQ6VXNlcjc5NTc4","avatar_url":"https://avatars2.githubusercontent.com/u/79578?v=4","gravatar_id":"","url":"https://api.github.com/users/ralight","html_url":"https://github.com/ralight","followers_url":"https://api.github.com/users/ralight/followers","following_url":"https://api.github.com/users/ralight/following{/other_user}","gists_url":"https://api.github.com/users/ralight/gists{/gist_id}","starred_url":"https://api.github.com/users/ralight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralight/subscriptions","organizations_url":"https://api.github.com/users/ralight/orgs","repos_url":"https://api.github.com/users/ralight/repos","events_url":"https://api.github.com/users/ralight/events{/privacy}","received_events_url":"https://api.github.com/users/ralight/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":11,"state":"open","created_at":"2018-11-09T17:44:20Z","updated_at":"2018-12-08T19:49:23Z","due_on":"2018-12-11T08:00:00Z","closed_at":null},"comments":4,"created_at":"2018-11-15T15:57:13Z","updated_at":"2018-12-08T19:50:59Z","closed_at":"2018-12-08T19:48:17Z","author_association":"NONE","body":"Hello\r\n\r\nI am experimenting with bridging brokers and the disconnect/reconnect behavior especially in connection to retained messages. I was trying the following procedure:\r\non computer 1, a broker in default configuration\r\non computer 2, a bridge with the following configuration:\r\n\r\n```\r\nconnection mybroker\r\naddress 192.168.0.185:1883\r\ncleansession true # I tried both with and without\r\ntopic # both 0\r\n```\r\n\r\n\r\nI had a mosquitto_sub -t \"#\" active both on computer 1 and 2.\r\n\r\n\r\nWith both brokers active\r\n`mosquitto_pub -r -t \"mytopic\" -m \"mypayload\"` resulted (correctly) in both clients printing the message and in both brokers retaining the message.\r\n`mosquitto_pub -r -t \"mytopic\" -n` resulted (correctly) in both clients printing the message and in both brokers cancelling the retained\r\n\r\nwhen computer 2 broker down\r\n`mosquitto_pub -r -t \"mytopic\" -m \"disconnected payload\"` resulted (correctly) in subscriber 1  printing the message and in broker 1 retaining the message. Pulling UP broker 2 resulted (correctly) in the retained message being propagated and retained to broker 2 and subscriber 2 printing the message.\r\n\r\n\r\n\r\n----------\r\n\r\nwhen computer 2 broker down\r\n`mosquitto_pub -r -t \"mytopic\" -n` resulted (correctly) in subscriber 1  printing the empty message and in broker 1 cancelling the retained message. Pulling UP broker 2 resulted (BUG?) in the retained message NOT CANCELLED on broker 2 (correctly cancelled on broker1 though) and  subscriber 2 printing the latest retained message. The retained message was the last NON-EMPTY message sent to the topic, even if it was on broker 1 before the reconnection.\r\n\r\nAnother thing I am not sure to understand is why broker 2 had a number of old retained (defined before the bridging) that were never sent to broker 1 .\r\n\r\nThank you for the help."},"comment":{"url":"https://api.github.com/repos/eclipse/mosquitto/issues/comments/445485193","html_url":"https://github.com/eclipse/mosquitto/issues/1040#issuecomment-445485193","issue_url":"https://api.github.com/repos/eclipse/mosquitto/issues/1040","id":445485193,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTQ4NTE5Mw==","user":{"login":"giorver","id":45073355,"node_id":"MDQ6VXNlcjQ1MDczMzU1","avatar_url":"https://avatars1.githubusercontent.com/u/45073355?v=4","gravatar_id":"","url":"https://api.github.com/users/giorver","html_url":"https://github.com/giorver","followers_url":"https://api.github.com/users/giorver/followers","following_url":"https://api.github.com/users/giorver/following{/other_user}","gists_url":"https://api.github.com/users/giorver/gists{/gist_id}","starred_url":"https://api.github.com/users/giorver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorver/subscriptions","organizations_url":"https://api.github.com/users/giorver/orgs","repos_url":"https://api.github.com/users/giorver/repos","events_url":"https://api.github.com/users/giorver/events{/privacy}","received_events_url":"https://api.github.com/users/giorver/received_events","type":"User","site_admin":false},"created_at":"2018-12-08T19:50:59Z","updated_at":"2018-12-08T19:50:59Z","author_association":"NONE","body":"Thanks :)\n\nIl giorno Sab 8 Dic 2018 20:48 Roger Light <notifications@github.com> ha\nscritto:\n\n> Closed #1040 <https://github.com/eclipse/mosquitto/issues/1040>.\n>\n> —\n> You are receiving this because you authored the thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/eclipse/mosquitto/issues/1040#event-2014111720>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/Aq_Dy0EjJyaVbHgez2TWFb1xkzDwZGxYks5u3BeHgaJpZM4YgFXR>\n> .\n>\n"}}
{"actor":{"display_login":"giorver"}}