{"action":"created","comment":{"url":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments/298654347","pull_request_review_id":255848997,"id":298654347,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI5ODY1NDM0Nw==","diff_hunk":"@@ -373,6 +372,86 @@ public String sendMessage(final Map<String, String> headers,\n       return MBeanInfoHelper.getMBeanAttributesInfo(AddressControl.class);\n    }\n \n+   @Override\n+   public void pause() throws Exception {\n+      pause(false);\n+   }\n+\n+   @Override\n+   public void pause(boolean persist) throws Exception {\n+      if (AuditLogger.isEnabled()) {\n+         AuditLogger.pause(addressInfo);\n+      }\n+      checkStarted();\n+\n+      clearIO();\n+      try {\n+         if (!addressInfo.isPaused()) {\n+            addressInfo.pause();\n+            if (persist) {\n+               server.getStorageManager().storeAddressStatus(addressInfo.getId(), AddressStatus.PAUSED);\n+            }","path":"artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/AddressControlImpl.java","position":39,"original_position":39,"commit_id":"951c7ffe6cc9e817de0984840ce119bea1b54f06","original_commit_id":"951c7ffe6cc9e817de0984840ce119bea1b54f06","user":{"login":"clebertsuconic","id":750514,"node_id":"MDQ6VXNlcjc1MDUxNA==","avatar_url":"https://avatars3.githubusercontent.com/u/750514?v=4","gravatar_id":"","url":"https://api.github.com/users/clebertsuconic","html_url":"https://github.com/clebertsuconic","followers_url":"https://api.github.com/users/clebertsuconic/followers","following_url":"https://api.github.com/users/clebertsuconic/following{/other_user}","gists_url":"https://api.github.com/users/clebertsuconic/gists{/gist_id}","starred_url":"https://api.github.com/users/clebertsuconic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clebertsuconic/subscriptions","organizations_url":"https://api.github.com/users/clebertsuconic/orgs","repos_url":"https://api.github.com/users/clebertsuconic/repos","events_url":"https://api.github.com/users/clebertsuconic/events{/privacy}","received_events_url":"https://api.github.com/users/clebertsuconic/received_events","type":"User","site_admin":false},"body":"A simple solution would be to create a setter on Addressinfo, and we call the setter right before we call the pause method.\r\n\r\nWe could throw an IllegalSTateException if the server is not informed. So the API would be... setServer(server);addressInfo.pause(true/false);","created_at":"2019-06-28T15:58:18Z","updated_at":"2019-06-28T15:58:18Z","html_url":"https://github.com/apache/activemq-artemis/pull/2731#discussion_r298654347","pull_request_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments/298654347"},"html":{"href":"https://github.com/apache/activemq-artemis/pull/2731#discussion_r298654347"},"pull_request":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731"}},"in_reply_to_id":298582545},"pull_request":{"url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731","id":291508959,"node_id":"MDExOlB1bGxSZXF1ZXN0MjkxNTA4OTU5","html_url":"https://github.com/apache/activemq-artemis/pull/2731","diff_url":"https://github.com/apache/activemq-artemis/pull/2731.diff","patch_url":"https://github.com/apache/activemq-artemis/pull/2731.patch","issue_url":"https://api.github.com/repos/apache/activemq-artemis/issues/2731","number":2731,"state":"open","locked":false,"title":"[ARTEMIS-2401]: Implement the Pause method for a Topic","user":{"login":"ehsavoie","id":73053,"node_id":"MDQ6VXNlcjczMDUz","avatar_url":"https://avatars3.githubusercontent.com/u/73053?v=4","gravatar_id":"","url":"https://api.github.com/users/ehsavoie","html_url":"https://github.com/ehsavoie","followers_url":"https://api.github.com/users/ehsavoie/followers","following_url":"https://api.github.com/users/ehsavoie/following{/other_user}","gists_url":"https://api.github.com/users/ehsavoie/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsavoie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsavoie/subscriptions","organizations_url":"https://api.github.com/users/ehsavoie/orgs","repos_url":"https://api.github.com/users/ehsavoie/repos","events_url":"https://api.github.com/users/ehsavoie/events{/privacy}","received_events_url":"https://api.github.com/users/ehsavoie/received_events","type":"User","site_admin":false},"body":"Adding support to pause a topic\r\n\r\nJira: https://issues.apache.org/jira/browse/ARTEMIS-2401","created_at":"2019-06-25T11:23:03Z","updated_at":"2019-06-28T15:58:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"042d9712d059d2fdf5de82fa8eb412cbf604626a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731/commits","review_comments_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731/comments","review_comment_url":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/activemq-artemis/issues/2731/comments","statuses_url":"https://api.github.com/repos/apache/activemq-artemis/statuses/951c7ffe6cc9e817de0984840ce119bea1b54f06","head":{"label":"ehsavoie:ARTEMIS-2401","ref":"ARTEMIS-2401","sha":"951c7ffe6cc9e817de0984840ce119bea1b54f06","user":{"login":"ehsavoie","id":73053,"node_id":"MDQ6VXNlcjczMDUz","avatar_url":"https://avatars3.githubusercontent.com/u/73053?v=4","gravatar_id":"","url":"https://api.github.com/users/ehsavoie","html_url":"https://github.com/ehsavoie","followers_url":"https://api.github.com/users/ehsavoie/followers","following_url":"https://api.github.com/users/ehsavoie/following{/other_user}","gists_url":"https://api.github.com/users/ehsavoie/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsavoie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsavoie/subscriptions","organizations_url":"https://api.github.com/users/ehsavoie/orgs","repos_url":"https://api.github.com/users/ehsavoie/repos","events_url":"https://api.github.com/users/ehsavoie/events{/privacy}","received_events_url":"https://api.github.com/users/ehsavoie/received_events","type":"User","site_admin":false},"repo":{"id":156242427,"node_id":"MDEwOlJlcG9zaXRvcnkxNTYyNDI0Mjc=","name":"apache-activemq-artemis","full_name":"ehsavoie/apache-activemq-artemis","private":false,"owner":{"login":"ehsavoie","id":73053,"node_id":"MDQ6VXNlcjczMDUz","avatar_url":"https://avatars3.githubusercontent.com/u/73053?v=4","gravatar_id":"","url":"https://api.github.com/users/ehsavoie","html_url":"https://github.com/ehsavoie","followers_url":"https://api.github.com/users/ehsavoie/followers","following_url":"https://api.github.com/users/ehsavoie/following{/other_user}","gists_url":"https://api.github.com/users/ehsavoie/gists{/gist_id}","starred_url":"https://api.github.com/users/ehsavoie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ehsavoie/subscriptions","organizations_url":"https://api.github.com/users/ehsavoie/orgs","repos_url":"https://api.github.com/users/ehsavoie/repos","events_url":"https://api.github.com/users/ehsavoie/events{/privacy}","received_events_url":"https://api.github.com/users/ehsavoie/received_events","type":"User","site_admin":false},"html_url":"https://github.com/ehsavoie/apache-activemq-artemis","description":"Mirror of Apache ActiveMQ Artemis","fork":true,"url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis","forks_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/forks","keys_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/teams","hooks_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/hooks","issue_events_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/issues/events{/number}","events_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/events","assignees_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/assignees{/user}","branches_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/branches{/branch}","tags_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/tags","blobs_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/git/refs{/sha}","trees_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/statuses/{sha}","languages_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/languages","stargazers_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/stargazers","contributors_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/contributors","subscribers_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/subscribers","subscription_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/subscription","commits_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/commits{/sha}","git_commits_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/git/commits{/sha}","comments_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/comments{/number}","issue_comment_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/issues/comments{/number}","contents_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/contents/{+path}","compare_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/merges","archive_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/downloads","issues_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/issues{/number}","pulls_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/pulls{/number}","milestones_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/milestones{/number}","notifications_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/labels{/name}","releases_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/releases{/id}","deployments_url":"https://api.github.com/repos/ehsavoie/apache-activemq-artemis/deployments","created_at":"2018-11-05T15:47:30Z","updated_at":"2019-03-01T14:06:20Z","pushed_at":"2019-06-28T08:32:34Z","git_url":"git://github.com/ehsavoie/apache-activemq-artemis.git","ssh_url":"git@github.com:ehsavoie/apache-activemq-artemis.git","clone_url":"https://github.com/ehsavoie/apache-activemq-artemis.git","svn_url":"https://github.com/ehsavoie/apache-activemq-artemis","homepage":"","size":61723,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"5896dcc6fbb9e81194c458baca79fb46b36470c5","user":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":36057260,"node_id":"MDEwOlJlcG9zaXRvcnkzNjA1NzI2MA==","name":"activemq-artemis","full_name":"apache/activemq-artemis","private":false,"owner":{"login":"apache","id":47359,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3MzU5","avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/apache/activemq-artemis","description":"Mirror of Apache ActiveMQ Artemis","fork":false,"url":"https://api.github.com/repos/apache/activemq-artemis","forks_url":"https://api.github.com/repos/apache/activemq-artemis/forks","keys_url":"https://api.github.com/repos/apache/activemq-artemis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/activemq-artemis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/activemq-artemis/teams","hooks_url":"https://api.github.com/repos/apache/activemq-artemis/hooks","issue_events_url":"https://api.github.com/repos/apache/activemq-artemis/issues/events{/number}","events_url":"https://api.github.com/repos/apache/activemq-artemis/events","assignees_url":"https://api.github.com/repos/apache/activemq-artemis/assignees{/user}","branches_url":"https://api.github.com/repos/apache/activemq-artemis/branches{/branch}","tags_url":"https://api.github.com/repos/apache/activemq-artemis/tags","blobs_url":"https://api.github.com/repos/apache/activemq-artemis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/activemq-artemis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/activemq-artemis/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/activemq-artemis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/activemq-artemis/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/activemq-artemis/languages","stargazers_url":"https://api.github.com/repos/apache/activemq-artemis/stargazers","contributors_url":"https://api.github.com/repos/apache/activemq-artemis/contributors","subscribers_url":"https://api.github.com/repos/apache/activemq-artemis/subscribers","subscription_url":"https://api.github.com/repos/apache/activemq-artemis/subscription","commits_url":"https://api.github.com/repos/apache/activemq-artemis/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/activemq-artemis/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/activemq-artemis/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/activemq-artemis/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/activemq-artemis/contents/{+path}","compare_url":"https://api.github.com/repos/apache/activemq-artemis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/activemq-artemis/merges","archive_url":"https://api.github.com/repos/apache/activemq-artemis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/activemq-artemis/downloads","issues_url":"https://api.github.com/repos/apache/activemq-artemis/issues{/number}","pulls_url":"https://api.github.com/repos/apache/activemq-artemis/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/activemq-artemis/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/activemq-artemis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/activemq-artemis/labels{/name}","releases_url":"https://api.github.com/repos/apache/activemq-artemis/releases{/id}","deployments_url":"https://api.github.com/repos/apache/activemq-artemis/deployments","created_at":"2015-05-22T07:00:05Z","updated_at":"2019-06-28T14:56:40Z","pushed_at":"2019-06-28T08:32:37Z","git_url":"git://github.com/apache/activemq-artemis.git","ssh_url":"git@github.com:apache/activemq-artemis.git","clone_url":"https://github.com/apache/activemq-artemis.git","svn_url":"https://github.com/apache/activemq-artemis","homepage":"","size":61928,"stargazers_count":446,"watchers_count":446,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":448,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":22,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":448,"open_issues":22,"watchers":446,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731"},"html":{"href":"https://github.com/apache/activemq-artemis/pull/2731"},"issue":{"href":"https://api.github.com/repos/apache/activemq-artemis/issues/2731"},"comments":{"href":"https://api.github.com/repos/apache/activemq-artemis/issues/2731/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/activemq-artemis/pulls/2731/commits"},"statuses":{"href":"https://api.github.com/repos/apache/activemq-artemis/statuses/951c7ffe6cc9e817de0984840ce119bea1b54f06"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"clebertsuconic"}}