{"action":"created","comment":{"url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/comments/27779099","id":27779099,"diff_hunk":"@@ -0,0 +1,45 @@\n+/**\n+ * Copyright 2015 Confluent Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ * http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ **/\n+package io.confluent.kafkarest;\n+\n+import io.confluent.kafkarest.simpleconsumerspool.SimpleConsumerPool;\n+import kafka.javaapi.FetchRequest;\n+import kafka.javaapi.FetchResponse;\n+import kafka.javaapi.consumer.SimpleConsumer;\n+\n+public class SimpleFetcher {","path":"src/main/java/io/confluent/kafkarest/SimpleFetcher.java","position":22,"original_position":23,"commit_id":"d69aa7e85071cffe68d0a0a7b3497a19b5862bb8","original_commit_id":"dc14821bddcbd377c02166dcb594040902bc6feb","user":{"login":"HenriJ","id":594657,"avatar_url":"https://avatars.githubusercontent.com/u/594657?v=3","gravatar_id":"","url":"https://api.github.com/users/HenriJ","html_url":"https://github.com/HenriJ","followers_url":"https://api.github.com/users/HenriJ/followers","following_url":"https://api.github.com/users/HenriJ/following{/other_user}","gists_url":"https://api.github.com/users/HenriJ/gists{/gist_id}","starred_url":"https://api.github.com/users/HenriJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenriJ/subscriptions","organizations_url":"https://api.github.com/users/HenriJ/orgs","repos_url":"https://api.github.com/users/HenriJ/repos","events_url":"https://api.github.com/users/HenriJ/events{/privacy}","received_events_url":"https://api.github.com/users/HenriJ/received_events","type":"User","site_admin":false},"body":"Yeah, at first I used auto-closeable. Maybe if you migrate to Java 1.7 someday it would be nicer this way ?\r\nOr if you want I remove the SimpleFetcher and I release the consumer into the pool with:\r\n`simpleConsumersPools.get(broker).release(consumer); // in the finally block`","created_at":"2015-04-05T17:54:04Z","updated_at":"2015-04-05T17:54:04Z","html_url":"https://github.com/confluentinc/kafka-rest/pull/66#discussion_r27779099","pull_request_url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/comments/27779099"},"html":{"href":"https://github.com/confluentinc/kafka-rest/pull/66#discussion_r27779099"},"pull_request":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66","id":31325159,"html_url":"https://github.com/confluentinc/kafka-rest/pull/66","diff_url":"https://github.com/confluentinc/kafka-rest/pull/66.diff","patch_url":"https://github.com/confluentinc/kafka-rest/pull/66.patch","issue_url":"https://api.github.com/repos/confluentinc/kafka-rest/issues/66","number":66,"state":"open","locked":false,"title":"Add support for SimpleConsumer-like access (Issue  #26)","user":{"login":"HenriJ","id":594657,"avatar_url":"https://avatars.githubusercontent.com/u/594657?v=3","gravatar_id":"","url":"https://api.github.com/users/HenriJ","html_url":"https://github.com/HenriJ","followers_url":"https://api.github.com/users/HenriJ/followers","following_url":"https://api.github.com/users/HenriJ/following{/other_user}","gists_url":"https://api.github.com/users/HenriJ/gists{/gist_id}","starred_url":"https://api.github.com/users/HenriJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenriJ/subscriptions","organizations_url":"https://api.github.com/users/HenriJ/orgs","repos_url":"https://api.github.com/users/HenriJ/repos","events_url":"https://api.github.com/users/HenriJ/events{/privacy}","received_events_url":"https://api.github.com/users/HenriJ/received_events","type":"User","site_admin":false},"body":"See issue #26 for previous discussion","created_at":"2015-03-17T11:07:03Z","updated_at":"2015-04-05T17:54:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a7e5da312d7253a34f437d20003b5bc0c135700","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66/commits","review_comments_url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66/comments","review_comment_url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/comments{/number}","comments_url":"https://api.github.com/repos/confluentinc/kafka-rest/issues/66/comments","statuses_url":"https://api.github.com/repos/confluentinc/kafka-rest/statuses/d69aa7e85071cffe68d0a0a7b3497a19b5862bb8","head":{"label":"HenriJ:master","ref":"master","sha":"d69aa7e85071cffe68d0a0a7b3497a19b5862bb8","user":{"login":"HenriJ","id":594657,"avatar_url":"https://avatars.githubusercontent.com/u/594657?v=3","gravatar_id":"","url":"https://api.github.com/users/HenriJ","html_url":"https://github.com/HenriJ","followers_url":"https://api.github.com/users/HenriJ/followers","following_url":"https://api.github.com/users/HenriJ/following{/other_user}","gists_url":"https://api.github.com/users/HenriJ/gists{/gist_id}","starred_url":"https://api.github.com/users/HenriJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenriJ/subscriptions","organizations_url":"https://api.github.com/users/HenriJ/orgs","repos_url":"https://api.github.com/users/HenriJ/repos","events_url":"https://api.github.com/users/HenriJ/events{/privacy}","received_events_url":"https://api.github.com/users/HenriJ/received_events","type":"User","site_admin":false},"repo":{"id":31652177,"name":"kafka-rest","full_name":"HenriJ/kafka-rest","owner":{"login":"HenriJ","id":594657,"avatar_url":"https://avatars.githubusercontent.com/u/594657?v=3","gravatar_id":"","url":"https://api.github.com/users/HenriJ","html_url":"https://github.com/HenriJ","followers_url":"https://api.github.com/users/HenriJ/followers","following_url":"https://api.github.com/users/HenriJ/following{/other_user}","gists_url":"https://api.github.com/users/HenriJ/gists{/gist_id}","starred_url":"https://api.github.com/users/HenriJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HenriJ/subscriptions","organizations_url":"https://api.github.com/users/HenriJ/orgs","repos_url":"https://api.github.com/users/HenriJ/repos","events_url":"https://api.github.com/users/HenriJ/events{/privacy}","received_events_url":"https://api.github.com/users/HenriJ/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/HenriJ/kafka-rest","description":"REST Proxy for Kafka","fork":true,"url":"https://api.github.com/repos/HenriJ/kafka-rest","forks_url":"https://api.github.com/repos/HenriJ/kafka-rest/forks","keys_url":"https://api.github.com/repos/HenriJ/kafka-rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HenriJ/kafka-rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HenriJ/kafka-rest/teams","hooks_url":"https://api.github.com/repos/HenriJ/kafka-rest/hooks","issue_events_url":"https://api.github.com/repos/HenriJ/kafka-rest/issues/events{/number}","events_url":"https://api.github.com/repos/HenriJ/kafka-rest/events","assignees_url":"https://api.github.com/repos/HenriJ/kafka-rest/assignees{/user}","branches_url":"https://api.github.com/repos/HenriJ/kafka-rest/branches{/branch}","tags_url":"https://api.github.com/repos/HenriJ/kafka-rest/tags","blobs_url":"https://api.github.com/repos/HenriJ/kafka-rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HenriJ/kafka-rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HenriJ/kafka-rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/HenriJ/kafka-rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HenriJ/kafka-rest/statuses/{sha}","languages_url":"https://api.github.com/repos/HenriJ/kafka-rest/languages","stargazers_url":"https://api.github.com/repos/HenriJ/kafka-rest/stargazers","contributors_url":"https://api.github.com/repos/HenriJ/kafka-rest/contributors","subscribers_url":"https://api.github.com/repos/HenriJ/kafka-rest/subscribers","subscription_url":"https://api.github.com/repos/HenriJ/kafka-rest/subscription","commits_url":"https://api.github.com/repos/HenriJ/kafka-rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/HenriJ/kafka-rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/HenriJ/kafka-rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/HenriJ/kafka-rest/issues/comments{/number}","contents_url":"https://api.github.com/repos/HenriJ/kafka-rest/contents/{+path}","compare_url":"https://api.github.com/repos/HenriJ/kafka-rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HenriJ/kafka-rest/merges","archive_url":"https://api.github.com/repos/HenriJ/kafka-rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HenriJ/kafka-rest/downloads","issues_url":"https://api.github.com/repos/HenriJ/kafka-rest/issues{/number}","pulls_url":"https://api.github.com/repos/HenriJ/kafka-rest/pulls{/number}","milestones_url":"https://api.github.com/repos/HenriJ/kafka-rest/milestones{/number}","notifications_url":"https://api.github.com/repos/HenriJ/kafka-rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HenriJ/kafka-rest/labels{/name}","releases_url":"https://api.github.com/repos/HenriJ/kafka-rest/releases{/id}","created_at":"2015-03-04T10:51:31Z","updated_at":"2015-04-05T17:33:00Z","pushed_at":"2015-04-05T17:32:59Z","git_url":"git://github.com/HenriJ/kafka-rest.git","ssh_url":"git@github.com:HenriJ/kafka-rest.git","clone_url":"https://github.com/HenriJ/kafka-rest.git","svn_url":"https://github.com/HenriJ/kafka-rest","homepage":null,"size":753,"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":"confluentinc:master","ref":"master","sha":"7609dd3db4a80b9c5aecb69ff80fa208421ce2d1","user":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars.githubusercontent.com/u/9439498?v=3","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"repo":{"id":26873147,"name":"kafka-rest","full_name":"confluentinc/kafka-rest","owner":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars.githubusercontent.com/u/9439498?v=3","gravatar_id":"","url":"https://api.github.com/users/confluentinc","html_url":"https://github.com/confluentinc","followers_url":"https://api.github.com/users/confluentinc/followers","following_url":"https://api.github.com/users/confluentinc/following{/other_user}","gists_url":"https://api.github.com/users/confluentinc/gists{/gist_id}","starred_url":"https://api.github.com/users/confluentinc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/confluentinc/subscriptions","organizations_url":"https://api.github.com/users/confluentinc/orgs","repos_url":"https://api.github.com/users/confluentinc/repos","events_url":"https://api.github.com/users/confluentinc/events{/privacy}","received_events_url":"https://api.github.com/users/confluentinc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/confluentinc/kafka-rest","description":"REST Proxy for Kafka","fork":false,"url":"https://api.github.com/repos/confluentinc/kafka-rest","forks_url":"https://api.github.com/repos/confluentinc/kafka-rest/forks","keys_url":"https://api.github.com/repos/confluentinc/kafka-rest/keys{/key_id}","collaborators_url":"https://api.github.com/repos/confluentinc/kafka-rest/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/confluentinc/kafka-rest/teams","hooks_url":"https://api.github.com/repos/confluentinc/kafka-rest/hooks","issue_events_url":"https://api.github.com/repos/confluentinc/kafka-rest/issues/events{/number}","events_url":"https://api.github.com/repos/confluentinc/kafka-rest/events","assignees_url":"https://api.github.com/repos/confluentinc/kafka-rest/assignees{/user}","branches_url":"https://api.github.com/repos/confluentinc/kafka-rest/branches{/branch}","tags_url":"https://api.github.com/repos/confluentinc/kafka-rest/tags","blobs_url":"https://api.github.com/repos/confluentinc/kafka-rest/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/confluentinc/kafka-rest/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/confluentinc/kafka-rest/git/refs{/sha}","trees_url":"https://api.github.com/repos/confluentinc/kafka-rest/git/trees{/sha}","statuses_url":"https://api.github.com/repos/confluentinc/kafka-rest/statuses/{sha}","languages_url":"https://api.github.com/repos/confluentinc/kafka-rest/languages","stargazers_url":"https://api.github.com/repos/confluentinc/kafka-rest/stargazers","contributors_url":"https://api.github.com/repos/confluentinc/kafka-rest/contributors","subscribers_url":"https://api.github.com/repos/confluentinc/kafka-rest/subscribers","subscription_url":"https://api.github.com/repos/confluentinc/kafka-rest/subscription","commits_url":"https://api.github.com/repos/confluentinc/kafka-rest/commits{/sha}","git_commits_url":"https://api.github.com/repos/confluentinc/kafka-rest/git/commits{/sha}","comments_url":"https://api.github.com/repos/confluentinc/kafka-rest/comments{/number}","issue_comment_url":"https://api.github.com/repos/confluentinc/kafka-rest/issues/comments{/number}","contents_url":"https://api.github.com/repos/confluentinc/kafka-rest/contents/{+path}","compare_url":"https://api.github.com/repos/confluentinc/kafka-rest/compare/{base}...{head}","merges_url":"https://api.github.com/repos/confluentinc/kafka-rest/merges","archive_url":"https://api.github.com/repos/confluentinc/kafka-rest/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/confluentinc/kafka-rest/downloads","issues_url":"https://api.github.com/repos/confluentinc/kafka-rest/issues{/number}","pulls_url":"https://api.github.com/repos/confluentinc/kafka-rest/pulls{/number}","milestones_url":"https://api.github.com/repos/confluentinc/kafka-rest/milestones{/number}","notifications_url":"https://api.github.com/repos/confluentinc/kafka-rest/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/confluentinc/kafka-rest/labels{/name}","releases_url":"https://api.github.com/repos/confluentinc/kafka-rest/releases{/id}","created_at":"2014-11-19T17:34:24Z","updated_at":"2015-04-05T09:03:59Z","pushed_at":"2015-04-05T17:33:00Z","git_url":"git://github.com/confluentinc/kafka-rest.git","ssh_url":"git@github.com:confluentinc/kafka-rest.git","clone_url":"https://github.com/confluentinc/kafka-rest.git","svn_url":"https://github.com/confluentinc/kafka-rest","homepage":null,"size":1546,"stargazers_count":28,"watchers_count":28,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":21,"forks":7,"open_issues":21,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66"},"html":{"href":"https://github.com/confluentinc/kafka-rest/pull/66"},"issue":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/issues/66"},"comments":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/confluentinc/kafka-rest/statuses/d69aa7e85071cffe68d0a0a7b3497a19b5862bb8"}}}}