{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/andes/pulls/comments/30348190","id":30348190,"diff_hunk":"@@ -365,6 +383,11 @@ public boolean handleAckReceived(UUID channel, long messageID) throws AndesExcep\n             log.debug(\"Ack Received message id= \" + messageID + \" channel id= \" + channel);\n         }\n \n+        if (retainedMessageList.contains(messageID)) {\n+            retainedMessageList.remove(messageID);","path":"modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/OnflightMessageTracker.java","position":51,"original_position":51,"commit_id":"e4e1b1f6a4d42b2a32d90d66fcc40762ae8443a3","original_commit_id":"e4e1b1f6a4d42b2a32d90d66fcc40762ae8443a3","user":{"login":"pumudu88","id":8552767,"avatar_url":"https://avatars.githubusercontent.com/u/8552767?v=3","gravatar_id":"","url":"https://api.github.com/users/pumudu88","html_url":"https://github.com/pumudu88","followers_url":"https://api.github.com/users/pumudu88/followers","following_url":"https://api.github.com/users/pumudu88/following{/other_user}","gists_url":"https://api.github.com/users/pumudu88/gists{/gist_id}","starred_url":"https://api.github.com/users/pumudu88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pumudu88/subscriptions","organizations_url":"https://api.github.com/users/pumudu88/orgs","repos_url":"https://api.github.com/users/pumudu88/repos","events_url":"https://api.github.com/users/pumudu88/events{/privacy}","received_events_url":"https://api.github.com/users/pumudu88/received_events","type":"User","site_admin":false},"body":"It will keep messages in retainedMessageList only until ack is received. after that it will remove that message id from the list. It similar to messageSendingTracker concurrent hashmap in OnflightMessageTracker.","created_at":"2015-05-14T18:29:45Z","updated_at":"2015-05-14T18:29:45Z","html_url":"https://github.com/wso2/andes/pull/115#discussion_r30348190","pull_request_url":"https://api.github.com/repos/wso2/andes/pulls/115","_links":{"self":{"href":"https://api.github.com/repos/wso2/andes/pulls/comments/30348190"},"html":{"href":"https://github.com/wso2/andes/pull/115#discussion_r30348190"},"pull_request":{"href":"https://api.github.com/repos/wso2/andes/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/andes/pulls/115","id":35065808,"html_url":"https://github.com/wso2/andes/pull/115","diff_url":"https://github.com/wso2/andes/pull/115.diff","patch_url":"https://github.com/wso2/andes/pull/115.patch","issue_url":"https://api.github.com/repos/wso2/andes/issues/115","number":115,"state":"open","locked":false,"title":"[WIP][MB-867] mqtt retain feature","user":{"login":"pumudu88","id":8552767,"avatar_url":"https://avatars.githubusercontent.com/u/8552767?v=3","gravatar_id":"","url":"https://api.github.com/users/pumudu88","html_url":"https://github.com/pumudu88","followers_url":"https://api.github.com/users/pumudu88/followers","following_url":"https://api.github.com/users/pumudu88/following{/other_user}","gists_url":"https://api.github.com/users/pumudu88/gists{/gist_id}","starred_url":"https://api.github.com/users/pumudu88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pumudu88/subscriptions","organizations_url":"https://api.github.com/users/pumudu88/orgs","repos_url":"https://api.github.com/users/pumudu88/repos","events_url":"https://api.github.com/users/pumudu88/events{/privacy}","received_events_url":"https://api.github.com/users/pumudu88/received_events","type":"User","site_admin":false},"body":"This will add retain feature to mb.\r\njira - https://wso2.org/jira/browse/MB-867","created_at":"2015-05-09T12:09:48Z","updated_at":"2015-05-14T18:29:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d17c50ecac8a00dd305a921dc720c83ddb31a788","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/andes/pulls/115/commits","review_comments_url":"https://api.github.com/repos/wso2/andes/pulls/115/comments","review_comment_url":"https://api.github.com/repos/wso2/andes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/andes/issues/115/comments","statuses_url":"https://api.github.com/repos/wso2/andes/statuses/e4e1b1f6a4d42b2a32d90d66fcc40762ae8443a3","head":{"label":"pumudu88:mqtt-retain","ref":"mqtt-retain","sha":"e4e1b1f6a4d42b2a32d90d66fcc40762ae8443a3","user":{"login":"pumudu88","id":8552767,"avatar_url":"https://avatars.githubusercontent.com/u/8552767?v=3","gravatar_id":"","url":"https://api.github.com/users/pumudu88","html_url":"https://github.com/pumudu88","followers_url":"https://api.github.com/users/pumudu88/followers","following_url":"https://api.github.com/users/pumudu88/following{/other_user}","gists_url":"https://api.github.com/users/pumudu88/gists{/gist_id}","starred_url":"https://api.github.com/users/pumudu88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pumudu88/subscriptions","organizations_url":"https://api.github.com/users/pumudu88/orgs","repos_url":"https://api.github.com/users/pumudu88/repos","events_url":"https://api.github.com/users/pumudu88/events{/privacy}","received_events_url":"https://api.github.com/users/pumudu88/received_events","type":"User","site_admin":false},"repo":{"id":30340525,"name":"andes","full_name":"pumudu88/andes","owner":{"login":"pumudu88","id":8552767,"avatar_url":"https://avatars.githubusercontent.com/u/8552767?v=3","gravatar_id":"","url":"https://api.github.com/users/pumudu88","html_url":"https://github.com/pumudu88","followers_url":"https://api.github.com/users/pumudu88/followers","following_url":"https://api.github.com/users/pumudu88/following{/other_user}","gists_url":"https://api.github.com/users/pumudu88/gists{/gist_id}","starred_url":"https://api.github.com/users/pumudu88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pumudu88/subscriptions","organizations_url":"https://api.github.com/users/pumudu88/orgs","repos_url":"https://api.github.com/users/pumudu88/repos","events_url":"https://api.github.com/users/pumudu88/events{/privacy}","received_events_url":"https://api.github.com/users/pumudu88/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pumudu88/andes","description":"","fork":true,"url":"https://api.github.com/repos/pumudu88/andes","forks_url":"https://api.github.com/repos/pumudu88/andes/forks","keys_url":"https://api.github.com/repos/pumudu88/andes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pumudu88/andes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pumudu88/andes/teams","hooks_url":"https://api.github.com/repos/pumudu88/andes/hooks","issue_events_url":"https://api.github.com/repos/pumudu88/andes/issues/events{/number}","events_url":"https://api.github.com/repos/pumudu88/andes/events","assignees_url":"https://api.github.com/repos/pumudu88/andes/assignees{/user}","branches_url":"https://api.github.com/repos/pumudu88/andes/branches{/branch}","tags_url":"https://api.github.com/repos/pumudu88/andes/tags","blobs_url":"https://api.github.com/repos/pumudu88/andes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pumudu88/andes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pumudu88/andes/git/refs{/sha}","trees_url":"https://api.github.com/repos/pumudu88/andes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pumudu88/andes/statuses/{sha}","languages_url":"https://api.github.com/repos/pumudu88/andes/languages","stargazers_url":"https://api.github.com/repos/pumudu88/andes/stargazers","contributors_url":"https://api.github.com/repos/pumudu88/andes/contributors","subscribers_url":"https://api.github.com/repos/pumudu88/andes/subscribers","subscription_url":"https://api.github.com/repos/pumudu88/andes/subscription","commits_url":"https://api.github.com/repos/pumudu88/andes/commits{/sha}","git_commits_url":"https://api.github.com/repos/pumudu88/andes/git/commits{/sha}","comments_url":"https://api.github.com/repos/pumudu88/andes/comments{/number}","issue_comment_url":"https://api.github.com/repos/pumudu88/andes/issues/comments{/number}","contents_url":"https://api.github.com/repos/pumudu88/andes/contents/{+path}","compare_url":"https://api.github.com/repos/pumudu88/andes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pumudu88/andes/merges","archive_url":"https://api.github.com/repos/pumudu88/andes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pumudu88/andes/downloads","issues_url":"https://api.github.com/repos/pumudu88/andes/issues{/number}","pulls_url":"https://api.github.com/repos/pumudu88/andes/pulls{/number}","milestones_url":"https://api.github.com/repos/pumudu88/andes/milestones{/number}","notifications_url":"https://api.github.com/repos/pumudu88/andes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pumudu88/andes/labels{/name}","releases_url":"https://api.github.com/repos/pumudu88/andes/releases{/id}","created_at":"2015-02-05T05:59:33Z","updated_at":"2015-04-22T07:02:28Z","pushed_at":"2015-05-12T11:59:29Z","git_url":"git://github.com/pumudu88/andes.git","ssh_url":"git@github.com:pumudu88/andes.git","clone_url":"https://github.com/pumudu88/andes.git","svn_url":"https://github.com/pumudu88/andes","homepage":null,"size":64367,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"92ee318f8449fc4dfee1fd69bd29fd3e7c0aeea1","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":20559270,"name":"andes","full_name":"wso2/andes","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/andes","description":"","fork":false,"url":"https://api.github.com/repos/wso2/andes","forks_url":"https://api.github.com/repos/wso2/andes/forks","keys_url":"https://api.github.com/repos/wso2/andes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/andes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/andes/teams","hooks_url":"https://api.github.com/repos/wso2/andes/hooks","issue_events_url":"https://api.github.com/repos/wso2/andes/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/andes/events","assignees_url":"https://api.github.com/repos/wso2/andes/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/andes/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/andes/tags","blobs_url":"https://api.github.com/repos/wso2/andes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/andes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/andes/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/andes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/andes/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/andes/languages","stargazers_url":"https://api.github.com/repos/wso2/andes/stargazers","contributors_url":"https://api.github.com/repos/wso2/andes/contributors","subscribers_url":"https://api.github.com/repos/wso2/andes/subscribers","subscription_url":"https://api.github.com/repos/wso2/andes/subscription","commits_url":"https://api.github.com/repos/wso2/andes/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/andes/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/andes/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/andes/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/andes/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/andes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/andes/merges","archive_url":"https://api.github.com/repos/wso2/andes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/andes/downloads","issues_url":"https://api.github.com/repos/wso2/andes/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/andes/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/andes/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/andes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/andes/labels{/name}","releases_url":"https://api.github.com/repos/wso2/andes/releases{/id}","created_at":"2014-06-06T10:04:24Z","updated_at":"2015-05-05T14:31:31Z","pushed_at":"2015-05-14T12:58:44Z","git_url":"git://github.com/wso2/andes.git","ssh_url":"git@github.com:wso2/andes.git","clone_url":"https://github.com/wso2/andes.git","svn_url":"https://github.com/wso2/andes","homepage":null,"size":66911,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":35,"mirror_url":null,"open_issues_count":9,"forks":35,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/andes/pulls/115"},"html":{"href":"https://github.com/wso2/andes/pull/115"},"issue":{"href":"https://api.github.com/repos/wso2/andes/issues/115"},"comments":{"href":"https://api.github.com/repos/wso2/andes/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/andes/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/andes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/andes/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/andes/statuses/e4e1b1f6a4d42b2a32d90d66fcc40762ae8443a3"}}}}