{"action":"created","comment":{"url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments/77887814","id":77887814,"diff_hunk":"@@ -95,59 +100,155 @@ public void setConsumersPerQueue(int consumersPerQueue) {\n \t}\n \n \t/**\n-\t * Set to false to requeue failed deliveries.\n-\t * @param requeueRejected the requeue rejected.\n+\t * Set to true for an exclusive consumer - if true, the\n+\t * {@link #setConsumersPerQueue(int) consumers per queue} must be 1.\n+\t * @param exclusive true for an exclusive consumer.\n \t */\n-\tpublic void setDefaultRequeueRejected(boolean requeueRejected) {\n-\t\tthis.defaultRequeueRejected = requeueRejected;\n+\t@Override\n+\tpublic final void setExclusive(boolean exclusive) {\n+\t\tAssert.isTrue(!exclusive || (this.consumersPerQueue == 1),\n+\t\t\t\t\"When the consumer is exclusive, the consumers per queue must be 1\");\n+\t\tsuper.setExclusive(exclusive);\n+\t}\n+\n+\t@Override\n+\tpublic void addQueueNames(String... queueNames) {\n+\t\taddQueues(Arrays.asList(queueNames));\n+\t\tsuper.addQueueNames(queueNames);\n+\t}\n+\n+\t@Override\n+\tpublic void addQueues(Queue... queues) {\n+\t\taddQueues(Arrays.asList(queues)\n+\t\t\t\t.stream()\n+\t\t\t\t.map(Queue::getName)\n+\t\t\t\t.collect(Collectors.toList()));\n+\t\tsuper.addQueues(queues);\n+\t}\n+\n+\tprivate void addQueues(Collection<String> queues) {\n+\t\tif (isRunning()) {\n+\t\t\tsynchronized (this.consumersMonitor) {\n+\t\t\t\tSet<String> current = getQueueNamesAsSet();\n+\t\t\t\tfor (String queue : queues) {\n+\t\t\t\t\tif (current.contains(queue)) {\n+\t\t\t\t\t\tthrow new IllegalStateException(\"Queue \" + queue + \" is already configured for this container: \"\n+\t\t\t\t\t\t\t\t+ this + \", no queues added\");\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\tList<String> added = new ArrayList<>();\n+\t\t\t\tfor (String queue : queues) {\n+\t\t\t\t\ttry {\n+\t\t\t\t\t\tconsumeFromQueue(queue);\n+\t\t\t\t\t\tadded.add(queue);\n+\t\t\t\t\t}\n+\t\t\t\t\tcatch (IOException e) {\n+\t\t\t\t\t\tlogger.error(\"Failed to add queue: \" + queue + \" undoing adds (if any)\");","path":"spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/DirectMessageListenerContainer.java","position":99,"original_position":99,"commit_id":"93e3c00df0120636f54cb27a8d05ee53ec962f2c","original_commit_id":"93e3c00df0120636f54cb27a8d05ee53ec962f2c","user":{"login":"artembilan","id":1071590,"avatar_url":"https://avatars.githubusercontent.com/u/1071590?v=3","gravatar_id":"","url":"https://api.github.com/users/artembilan","html_url":"https://github.com/artembilan","followers_url":"https://api.github.com/users/artembilan/followers","following_url":"https://api.github.com/users/artembilan/following{/other_user}","gists_url":"https://api.github.com/users/artembilan/gists{/gist_id}","starred_url":"https://api.github.com/users/artembilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artembilan/subscriptions","organizations_url":"https://api.github.com/users/artembilan/orgs","repos_url":"https://api.github.com/users/artembilan/repos","events_url":"https://api.github.com/users/artembilan/events{/privacy}","received_events_url":"https://api.github.com/users/artembilan/received_events","type":"User","site_admin":false},"body":"Ha! Because `logger` is a property in super class.\r\nI guess that broader area is just not supported.\r\n\r\nNot sure how that would be easy to trace properties from super classes without compilation...\r\n\r\nI guess we don't have choice unless live with this limitation.","created_at":"2016-09-07T19:27:37Z","updated_at":"2016-09-07T19:27:37Z","html_url":"https://github.com/spring-projects/spring-amqp/pull/451#discussion_r77887814","pull_request_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451","_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments/77887814"},"html":{"href":"https://github.com/spring-projects/spring-amqp/pull/451#discussion_r77887814"},"pull_request":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451"}}},"pull_request":{"url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451","id":84341469,"html_url":"https://github.com/spring-projects/spring-amqp/pull/451","diff_url":"https://github.com/spring-projects/spring-amqp/pull/451.diff","patch_url":"https://github.com/spring-projects/spring-amqp/pull/451.patch","issue_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/451","number":451,"state":"open","locked":false,"title":"AMQP-637: DirectMLContainer - Add/Remove Queues","user":{"login":"garyrussell","id":483832,"avatar_url":"https://avatars.githubusercontent.com/u/483832?v=3","gravatar_id":"","url":"https://api.github.com/users/garyrussell","html_url":"https://github.com/garyrussell","followers_url":"https://api.github.com/users/garyrussell/followers","following_url":"https://api.github.com/users/garyrussell/following{/other_user}","gists_url":"https://api.github.com/users/garyrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/garyrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyrussell/subscriptions","organizations_url":"https://api.github.com/users/garyrussell/orgs","repos_url":"https://api.github.com/users/garyrussell/repos","events_url":"https://api.github.com/users/garyrussell/events{/privacy}","received_events_url":"https://api.github.com/users/garyrussell/received_events","type":"User","site_admin":false},"body":"JIRA: https://jira.spring.io/browse/AMQP-637\r\n\r\nAlso pull up some more common properties to abstract container class.","created_at":"2016-09-07T17:27:34Z","updated_at":"2016-09-07T19:27:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b5e48ba84e2ec21714e82e7008055964d3f86079","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451/commits","review_comments_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451/comments","review_comment_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/451/comments","statuses_url":"https://api.github.com/repos/spring-projects/spring-amqp/statuses/93e3c00df0120636f54cb27a8d05ee53ec962f2c","head":{"label":"garyrussell:AMQP-637","ref":"AMQP-637","sha":"93e3c00df0120636f54cb27a8d05ee53ec962f2c","user":{"login":"garyrussell","id":483832,"avatar_url":"https://avatars.githubusercontent.com/u/483832?v=3","gravatar_id":"","url":"https://api.github.com/users/garyrussell","html_url":"https://github.com/garyrussell","followers_url":"https://api.github.com/users/garyrussell/followers","following_url":"https://api.github.com/users/garyrussell/following{/other_user}","gists_url":"https://api.github.com/users/garyrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/garyrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyrussell/subscriptions","organizations_url":"https://api.github.com/users/garyrussell/orgs","repos_url":"https://api.github.com/users/garyrussell/repos","events_url":"https://api.github.com/users/garyrussell/events{/privacy}","received_events_url":"https://api.github.com/users/garyrussell/received_events","type":"User","site_admin":false},"repo":{"id":3138424,"name":"spring-amqp","full_name":"garyrussell/spring-amqp","owner":{"login":"garyrussell","id":483832,"avatar_url":"https://avatars.githubusercontent.com/u/483832?v=3","gravatar_id":"","url":"https://api.github.com/users/garyrussell","html_url":"https://github.com/garyrussell","followers_url":"https://api.github.com/users/garyrussell/followers","following_url":"https://api.github.com/users/garyrussell/following{/other_user}","gists_url":"https://api.github.com/users/garyrussell/gists{/gist_id}","starred_url":"https://api.github.com/users/garyrussell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garyrussell/subscriptions","organizations_url":"https://api.github.com/users/garyrussell/orgs","repos_url":"https://api.github.com/users/garyrussell/repos","events_url":"https://api.github.com/users/garyrussell/events{/privacy}","received_events_url":"https://api.github.com/users/garyrussell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/garyrussell/spring-amqp","description":"Spring AMQP - support for Spring programming model with AMQP, especially but not limited to RabbitMQ","fork":true,"url":"https://api.github.com/repos/garyrussell/spring-amqp","forks_url":"https://api.github.com/repos/garyrussell/spring-amqp/forks","keys_url":"https://api.github.com/repos/garyrussell/spring-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/garyrussell/spring-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/garyrussell/spring-amqp/teams","hooks_url":"https://api.github.com/repos/garyrussell/spring-amqp/hooks","issue_events_url":"https://api.github.com/repos/garyrussell/spring-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/garyrussell/spring-amqp/events","assignees_url":"https://api.github.com/repos/garyrussell/spring-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/garyrussell/spring-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/garyrussell/spring-amqp/tags","blobs_url":"https://api.github.com/repos/garyrussell/spring-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/garyrussell/spring-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/garyrussell/spring-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/garyrussell/spring-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/garyrussell/spring-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/garyrussell/spring-amqp/languages","stargazers_url":"https://api.github.com/repos/garyrussell/spring-amqp/stargazers","contributors_url":"https://api.github.com/repos/garyrussell/spring-amqp/contributors","subscribers_url":"https://api.github.com/repos/garyrussell/spring-amqp/subscribers","subscription_url":"https://api.github.com/repos/garyrussell/spring-amqp/subscription","commits_url":"https://api.github.com/repos/garyrussell/spring-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/garyrussell/spring-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/garyrussell/spring-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/garyrussell/spring-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/garyrussell/spring-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/garyrussell/spring-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/garyrussell/spring-amqp/merges","archive_url":"https://api.github.com/repos/garyrussell/spring-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/garyrussell/spring-amqp/downloads","issues_url":"https://api.github.com/repos/garyrussell/spring-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/garyrussell/spring-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/garyrussell/spring-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/garyrussell/spring-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/garyrussell/spring-amqp/labels{/name}","releases_url":"https://api.github.com/repos/garyrussell/spring-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/garyrussell/spring-amqp/deployments","created_at":"2012-01-09T17:21:18Z","updated_at":"2016-09-07T14:35:47Z","pushed_at":"2016-09-07T17:27:00Z","git_url":"git://github.com/garyrussell/spring-amqp.git","ssh_url":"git@github.com:garyrussell/spring-amqp.git","clone_url":"https://github.com/garyrussell/spring-amqp.git","svn_url":"https://github.com/garyrussell/spring-amqp","homepage":"http://www.springsource.org/spring-amqp","size":7790,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":4,"default_branch":"master"}},"base":{"label":"spring-projects:master","ref":"master","sha":"f369fb617fa736c81849079cf0ab00f6774be81d","user":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"repo":{"id":1088796,"name":"spring-amqp","full_name":"spring-projects/spring-amqp","owner":{"login":"spring-projects","id":317776,"avatar_url":"https://avatars.githubusercontent.com/u/317776?v=3","gravatar_id":"","url":"https://api.github.com/users/spring-projects","html_url":"https://github.com/spring-projects","followers_url":"https://api.github.com/users/spring-projects/followers","following_url":"https://api.github.com/users/spring-projects/following{/other_user}","gists_url":"https://api.github.com/users/spring-projects/gists{/gist_id}","starred_url":"https://api.github.com/users/spring-projects/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spring-projects/subscriptions","organizations_url":"https://api.github.com/users/spring-projects/orgs","repos_url":"https://api.github.com/users/spring-projects/repos","events_url":"https://api.github.com/users/spring-projects/events{/privacy}","received_events_url":"https://api.github.com/users/spring-projects/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spring-projects/spring-amqp","description":"Spring AMQP - support for Spring programming model with AMQP, especially but not limited to RabbitMQ","fork":false,"url":"https://api.github.com/repos/spring-projects/spring-amqp","forks_url":"https://api.github.com/repos/spring-projects/spring-amqp/forks","keys_url":"https://api.github.com/repos/spring-projects/spring-amqp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spring-projects/spring-amqp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spring-projects/spring-amqp/teams","hooks_url":"https://api.github.com/repos/spring-projects/spring-amqp/hooks","issue_events_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/events{/number}","events_url":"https://api.github.com/repos/spring-projects/spring-amqp/events","assignees_url":"https://api.github.com/repos/spring-projects/spring-amqp/assignees{/user}","branches_url":"https://api.github.com/repos/spring-projects/spring-amqp/branches{/branch}","tags_url":"https://api.github.com/repos/spring-projects/spring-amqp/tags","blobs_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/refs{/sha}","trees_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spring-projects/spring-amqp/statuses/{sha}","languages_url":"https://api.github.com/repos/spring-projects/spring-amqp/languages","stargazers_url":"https://api.github.com/repos/spring-projects/spring-amqp/stargazers","contributors_url":"https://api.github.com/repos/spring-projects/spring-amqp/contributors","subscribers_url":"https://api.github.com/repos/spring-projects/spring-amqp/subscribers","subscription_url":"https://api.github.com/repos/spring-projects/spring-amqp/subscription","commits_url":"https://api.github.com/repos/spring-projects/spring-amqp/commits{/sha}","git_commits_url":"https://api.github.com/repos/spring-projects/spring-amqp/git/commits{/sha}","comments_url":"https://api.github.com/repos/spring-projects/spring-amqp/comments{/number}","issue_comment_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues/comments{/number}","contents_url":"https://api.github.com/repos/spring-projects/spring-amqp/contents/{+path}","compare_url":"https://api.github.com/repos/spring-projects/spring-amqp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spring-projects/spring-amqp/merges","archive_url":"https://api.github.com/repos/spring-projects/spring-amqp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spring-projects/spring-amqp/downloads","issues_url":"https://api.github.com/repos/spring-projects/spring-amqp/issues{/number}","pulls_url":"https://api.github.com/repos/spring-projects/spring-amqp/pulls{/number}","milestones_url":"https://api.github.com/repos/spring-projects/spring-amqp/milestones{/number}","notifications_url":"https://api.github.com/repos/spring-projects/spring-amqp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spring-projects/spring-amqp/labels{/name}","releases_url":"https://api.github.com/repos/spring-projects/spring-amqp/releases{/id}","deployments_url":"https://api.github.com/repos/spring-projects/spring-amqp/deployments","created_at":"2010-11-17T15:50:16Z","updated_at":"2016-09-04T11:54:25Z","pushed_at":"2016-09-07T17:27:34Z","git_url":"git://github.com/spring-projects/spring-amqp.git","ssh_url":"git@github.com:spring-projects/spring-amqp.git","clone_url":"https://github.com/spring-projects/spring-amqp.git","svn_url":"https://github.com/spring-projects/spring-amqp","homepage":"http://www.springsource.org/spring-amqp","size":8799,"stargazers_count":251,"watchers_count":251,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":222,"mirror_url":null,"open_issues_count":2,"forks":222,"open_issues":2,"watchers":251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451"},"html":{"href":"https://github.com/spring-projects/spring-amqp/pull/451"},"issue":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/issues/451"},"comments":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/issues/451/comments"},"review_comments":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451/comments"},"review_comment":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/pulls/451/commits"},"statuses":{"href":"https://api.github.com/repos/spring-projects/spring-amqp/statuses/93e3c00df0120636f54cb27a8d05ee53ec962f2c"}}}}
{"actor":{"display_login":"artembilan"}}