{"action":"created","comment":{"url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/comments/166739980","pull_request_review_id":94852309,"id":166739980,"diff_hunk":"@@ -261,6 +263,58 @@ func (c *Consumer) Events() chan Event {\n \treturn c.events\n }\n \n+// ReadMessage polls the consumer for a message.\n+//\n+// This is a conveniance API that wraps Poll() and only returns\n+// messages or errors. All other event types are discarded.\n+//\n+// The call will block for at most `timeoutMs` waiting for\n+// a new message or error. `timeoutMs` may be set to -1 for\n+// indefinate wait.\n+//\n+// Timeout is returned as (nil, err) where err is `kafka.(Error).Code == Kafka.ErrTimedOut`.\n+//\n+// Messages are returned as (msg, nil),\n+// while general errors are returned as (nil, err),\n+// and partition-specific errors are returned as (msg, err) where\n+// msg.TopicPartition provides partition-specific information (such as topic, partition and offset).\n+//\n+// All other event types, such as PartitionEOF, AssignedPartitions, etc, are silently discarded.\n+//\n+func (c *Consumer) ReadMessage(timeoutMs int) (*Message, error) {","path":"kafka/consumer.go","position":31,"original_position":31,"commit_id":"e39ec2ee0e9565265044b74278cc1ddf84323862","original_commit_id":"e39ec2ee0e9565265044b74278cc1ddf84323862","user":{"login":"travisjeffery","id":15225,"avatar_url":"https://avatars3.githubusercontent.com/u/15225?v=4","gravatar_id":"","url":"https://api.github.com/users/travisjeffery","html_url":"https://github.com/travisjeffery","followers_url":"https://api.github.com/users/travisjeffery/followers","following_url":"https://api.github.com/users/travisjeffery/following{/other_user}","gists_url":"https://api.github.com/users/travisjeffery/gists{/gist_id}","starred_url":"https://api.github.com/users/travisjeffery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travisjeffery/subscriptions","organizations_url":"https://api.github.com/users/travisjeffery/orgs","repos_url":"https://api.github.com/users/travisjeffery/repos","events_url":"https://api.github.com/users/travisjeffery/events{/privacy}","received_events_url":"https://api.github.com/users/travisjeffery/received_events","type":"User","site_admin":false},"body":"The way it works now is 0 is infinite right? Could still work the same way. For example:\r\n\r\n```\r\nfunc main() {\r\n\tfn(0)\r\n}\r\n\r\nfunc fn(timeout time.Duration) {\r\n\tfmt.Printf(\"timeout: %v, %v\", timeout, timeout == 0)\r\n}\r\n\r\n# >> timeout: 0s, true\r\n```\r\n","created_at":"2018-02-07T20:07:54Z","updated_at":"2018-02-07T20:07:54Z","html_url":"https://github.com/confluentinc/confluent-kafka-go/pull/120#discussion_r166739980","pull_request_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/comments/166739980"},"html":{"href":"https://github.com/confluentinc/confluent-kafka-go/pull/120#discussion_r166739980"},"pull_request":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120"}},"in_reply_to_id":166724815},"pull_request":{"url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120","id":166480172,"html_url":"https://github.com/confluentinc/confluent-kafka-go/pull/120","diff_url":"https://github.com/confluentinc/confluent-kafka-go/pull/120.diff","patch_url":"https://github.com/confluentinc/confluent-kafka-go/pull/120.patch","issue_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/120","number":120,"state":"open","locked":false,"title":"Message headers support","user":{"login":"edenhill","id":524990,"avatar_url":"https://avatars0.githubusercontent.com/u/524990?v=4","gravatar_id":"","url":"https://api.github.com/users/edenhill","html_url":"https://github.com/edenhill","followers_url":"https://api.github.com/users/edenhill/followers","following_url":"https://api.github.com/users/edenhill/following{/other_user}","gists_url":"https://api.github.com/users/edenhill/gists{/gist_id}","starred_url":"https://api.github.com/users/edenhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenhill/subscriptions","organizations_url":"https://api.github.com/users/edenhill/orgs","repos_url":"https://api.github.com/users/edenhill/repos","events_url":"https://api.github.com/users/edenhill/events{/privacy}","received_events_url":"https://api.github.com/users/edenhill/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-01T09:12:34Z","updated_at":"2018-02-07T20:07:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a4f964707cd08ac761161e3aa384f4365bf9781c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120/commits","review_comments_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120/comments","review_comment_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/120/comments","statuses_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/statuses/e39ec2ee0e9565265044b74278cc1ddf84323862","head":{"label":"confluentinc:headers","ref":"headers","sha":"e39ec2ee0e9565265044b74278cc1ddf84323862","user":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","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":63196359,"name":"confluent-kafka-go","full_name":"confluentinc/confluent-kafka-go","owner":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","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/confluent-kafka-go","description":"Confluent's Apache Kafka Golang client","fork":false,"url":"https://api.github.com/repos/confluentinc/confluent-kafka-go","forks_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/forks","keys_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/teams","hooks_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/hooks","issue_events_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/events{/number}","events_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/events","assignees_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/assignees{/user}","branches_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/branches{/branch}","tags_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/tags","blobs_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/statuses/{sha}","languages_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/languages","stargazers_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/stargazers","contributors_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/contributors","subscribers_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/subscribers","subscription_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/subscription","commits_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/contents/{+path}","compare_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/merges","archive_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/downloads","issues_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues{/number}","pulls_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls{/number}","milestones_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/milestones{/number}","notifications_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/labels{/name}","releases_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/releases{/id}","deployments_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/deployments","created_at":"2016-07-12T22:23:34Z","updated_at":"2018-02-07T07:18:38Z","pushed_at":"2018-02-01T09:40:38Z","git_url":"git://github.com/confluentinc/confluent-kafka-go.git","ssh_url":"git@github.com:confluentinc/confluent-kafka-go.git","clone_url":"https://github.com/confluentinc/confluent-kafka-go.git","svn_url":"https://github.com/confluentinc/confluent-kafka-go","homepage":"","size":252,"stargazers_count":482,"watchers_count":482,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":83,"open_issues":24,"watchers":482,"default_branch":"master"}},"base":{"label":"confluentinc:master","ref":"master","sha":"467fbeaba03c316f7799e3ae3ae25a91fafa9946","user":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","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":63196359,"name":"confluent-kafka-go","full_name":"confluentinc/confluent-kafka-go","owner":{"login":"confluentinc","id":9439498,"avatar_url":"https://avatars0.githubusercontent.com/u/9439498?v=4","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/confluent-kafka-go","description":"Confluent's Apache Kafka Golang client","fork":false,"url":"https://api.github.com/repos/confluentinc/confluent-kafka-go","forks_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/forks","keys_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/teams","hooks_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/hooks","issue_events_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/events{/number}","events_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/events","assignees_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/assignees{/user}","branches_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/branches{/branch}","tags_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/tags","blobs_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/statuses/{sha}","languages_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/languages","stargazers_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/stargazers","contributors_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/contributors","subscribers_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/subscribers","subscription_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/subscription","commits_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/contents/{+path}","compare_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/merges","archive_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/downloads","issues_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues{/number}","pulls_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls{/number}","milestones_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/milestones{/number}","notifications_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/labels{/name}","releases_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/releases{/id}","deployments_url":"https://api.github.com/repos/confluentinc/confluent-kafka-go/deployments","created_at":"2016-07-12T22:23:34Z","updated_at":"2018-02-07T07:18:38Z","pushed_at":"2018-02-01T09:40:38Z","git_url":"git://github.com/confluentinc/confluent-kafka-go.git","ssh_url":"git@github.com:confluentinc/confluent-kafka-go.git","clone_url":"https://github.com/confluentinc/confluent-kafka-go.git","svn_url":"https://github.com/confluentinc/confluent-kafka-go","homepage":"","size":252,"stargazers_count":482,"watchers_count":482,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":83,"mirror_url":null,"archived":false,"open_issues_count":24,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":83,"open_issues":24,"watchers":482,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120"},"html":{"href":"https://github.com/confluentinc/confluent-kafka-go/pull/120"},"issue":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/120"},"comments":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/issues/120/comments"},"review_comments":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120/comments"},"review_comment":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/pulls/120/commits"},"statuses":{"href":"https://api.github.com/repos/confluentinc/confluent-kafka-go/statuses/e39ec2ee0e9565265044b74278cc1ddf84323862"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"travisjeffery"}}