{"action":"created","comment":{"url":"https://api.github.com/repos/segmentio/kafka-go/pulls/comments/178345907","pull_request_review_id":108398379,"id":178345907,"diff_hunk":"@@ -824,6 +828,9 @@ func (r *Reader) run() {\n // ReaderConfig is a configuration object used to create new instances of\n // Reader.\n type ReaderConfig struct {\n+\t// If the reading should be started from the latest offset instead of the earliest one\n+\tLatest bool","path":"reader.go","position":18,"original_position":18,"commit_id":"6d3d5472938becf41d9183157876027d2e72387e","original_commit_id":"6d3d5472938becf41d9183157876027d2e72387e","user":{"login":"errnoh","id":373946,"avatar_url":"https://avatars3.githubusercontent.com/u/373946?v=4","gravatar_id":"","url":"https://api.github.com/users/errnoh","html_url":"https://github.com/errnoh","followers_url":"https://api.github.com/users/errnoh/followers","following_url":"https://api.github.com/users/errnoh/following{/other_user}","gists_url":"https://api.github.com/users/errnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/errnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errnoh/subscriptions","organizations_url":"https://api.github.com/users/errnoh/orgs","repos_url":"https://api.github.com/users/errnoh/repos","events_url":"https://api.github.com/users/errnoh/events{/privacy}","received_events_url":"https://api.github.com/users/errnoh/received_events","type":"User","site_admin":false},"body":"The problem is that `offset` only has context in a `topic/partition` pair. This ReaderConfig field was added to be used with a consumer group that handles all partitions in a single topic.\r\n\r\nOf course I have a bias here as well since I'm using ReaderConfig for the consumer group while others may use it only to read a single partition for example. In that case it would indeed then work as you'd expect. But in that case setting it to anything other than FirstOffset or LastOffset when using consumer group should probably throw an error.\r\n\r\nFor generic solution that covers all cases there is the other discussion happening in this same PR. Basically it would mean passing `[partition]offset` map and an optional `whence` which probably would default to absolute value.","created_at":"2018-03-30T18:33:52Z","updated_at":"2018-03-30T18:33:52Z","html_url":"https://github.com/segmentio/kafka-go/pull/88#discussion_r178345907","pull_request_url":"https://api.github.com/repos/segmentio/kafka-go/pulls/88","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/segmentio/kafka-go/pulls/comments/178345907"},"html":{"href":"https://github.com/segmentio/kafka-go/pull/88#discussion_r178345907"},"pull_request":{"href":"https://api.github.com/repos/segmentio/kafka-go/pulls/88"}},"in_reply_to_id":177464586},"pull_request":{"url":"https://api.github.com/repos/segmentio/kafka-go/pulls/88","id":177675130,"html_url":"https://github.com/segmentio/kafka-go/pull/88","diff_url":"https://github.com/segmentio/kafka-go/pull/88.diff","patch_url":"https://github.com/segmentio/kafka-go/pull/88.patch","issue_url":"https://api.github.com/repos/segmentio/kafka-go/issues/88","number":88,"state":"open","locked":false,"title":"Add Latest option to readerconfig to start reading from latest offset","user":{"login":"errnoh","id":373946,"avatar_url":"https://avatars3.githubusercontent.com/u/373946?v=4","gravatar_id":"","url":"https://api.github.com/users/errnoh","html_url":"https://github.com/errnoh","followers_url":"https://api.github.com/users/errnoh/followers","following_url":"https://api.github.com/users/errnoh/following{/other_user}","gists_url":"https://api.github.com/users/errnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/errnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errnoh/subscriptions","organizations_url":"https://api.github.com/users/errnoh/orgs","repos_url":"https://api.github.com/users/errnoh/repos","events_url":"https://api.github.com/users/errnoh/events{/privacy}","received_events_url":"https://api.github.com/users/errnoh/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-27T09:08:14Z","updated_at":"2018-03-30T18:33:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c617014b8bb810e44060d18146d2755be7d0fcf9","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/segmentio/kafka-go/pulls/88/commits","review_comments_url":"https://api.github.com/repos/segmentio/kafka-go/pulls/88/comments","review_comment_url":"https://api.github.com/repos/segmentio/kafka-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segmentio/kafka-go/issues/88/comments","statuses_url":"https://api.github.com/repos/segmentio/kafka-go/statuses/6d3d5472938becf41d9183157876027d2e72387e","head":{"label":"errnoh:feature/consumegroup-from-latest","ref":"feature/consumegroup-from-latest","sha":"6d3d5472938becf41d9183157876027d2e72387e","user":{"login":"errnoh","id":373946,"avatar_url":"https://avatars3.githubusercontent.com/u/373946?v=4","gravatar_id":"","url":"https://api.github.com/users/errnoh","html_url":"https://github.com/errnoh","followers_url":"https://api.github.com/users/errnoh/followers","following_url":"https://api.github.com/users/errnoh/following{/other_user}","gists_url":"https://api.github.com/users/errnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/errnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errnoh/subscriptions","organizations_url":"https://api.github.com/users/errnoh/orgs","repos_url":"https://api.github.com/users/errnoh/repos","events_url":"https://api.github.com/users/errnoh/events{/privacy}","received_events_url":"https://api.github.com/users/errnoh/received_events","type":"User","site_admin":false},"repo":{"id":126953577,"name":"kafka-go","full_name":"errnoh/kafka-go","owner":{"login":"errnoh","id":373946,"avatar_url":"https://avatars3.githubusercontent.com/u/373946?v=4","gravatar_id":"","url":"https://api.github.com/users/errnoh","html_url":"https://github.com/errnoh","followers_url":"https://api.github.com/users/errnoh/followers","following_url":"https://api.github.com/users/errnoh/following{/other_user}","gists_url":"https://api.github.com/users/errnoh/gists{/gist_id}","starred_url":"https://api.github.com/users/errnoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/errnoh/subscriptions","organizations_url":"https://api.github.com/users/errnoh/orgs","repos_url":"https://api.github.com/users/errnoh/repos","events_url":"https://api.github.com/users/errnoh/events{/privacy}","received_events_url":"https://api.github.com/users/errnoh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/errnoh/kafka-go","description":"Kafka library in Go","fork":true,"url":"https://api.github.com/repos/errnoh/kafka-go","forks_url":"https://api.github.com/repos/errnoh/kafka-go/forks","keys_url":"https://api.github.com/repos/errnoh/kafka-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/errnoh/kafka-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/errnoh/kafka-go/teams","hooks_url":"https://api.github.com/repos/errnoh/kafka-go/hooks","issue_events_url":"https://api.github.com/repos/errnoh/kafka-go/issues/events{/number}","events_url":"https://api.github.com/repos/errnoh/kafka-go/events","assignees_url":"https://api.github.com/repos/errnoh/kafka-go/assignees{/user}","branches_url":"https://api.github.com/repos/errnoh/kafka-go/branches{/branch}","tags_url":"https://api.github.com/repos/errnoh/kafka-go/tags","blobs_url":"https://api.github.com/repos/errnoh/kafka-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/errnoh/kafka-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/errnoh/kafka-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/errnoh/kafka-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/errnoh/kafka-go/statuses/{sha}","languages_url":"https://api.github.com/repos/errnoh/kafka-go/languages","stargazers_url":"https://api.github.com/repos/errnoh/kafka-go/stargazers","contributors_url":"https://api.github.com/repos/errnoh/kafka-go/contributors","subscribers_url":"https://api.github.com/repos/errnoh/kafka-go/subscribers","subscription_url":"https://api.github.com/repos/errnoh/kafka-go/subscription","commits_url":"https://api.github.com/repos/errnoh/kafka-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/errnoh/kafka-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/errnoh/kafka-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/errnoh/kafka-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/errnoh/kafka-go/contents/{+path}","compare_url":"https://api.github.com/repos/errnoh/kafka-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/errnoh/kafka-go/merges","archive_url":"https://api.github.com/repos/errnoh/kafka-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/errnoh/kafka-go/downloads","issues_url":"https://api.github.com/repos/errnoh/kafka-go/issues{/number}","pulls_url":"https://api.github.com/repos/errnoh/kafka-go/pulls{/number}","milestones_url":"https://api.github.com/repos/errnoh/kafka-go/milestones{/number}","notifications_url":"https://api.github.com/repos/errnoh/kafka-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/errnoh/kafka-go/labels{/name}","releases_url":"https://api.github.com/repos/errnoh/kafka-go/releases{/id}","deployments_url":"https://api.github.com/repos/errnoh/kafka-go/deployments","created_at":"2018-03-27T08:22:52Z","updated_at":"2018-03-27T08:22:54Z","pushed_at":"2018-03-27T09:07:00Z","git_url":"git://github.com/errnoh/kafka-go.git","ssh_url":"git@github.com:errnoh/kafka-go.git","clone_url":"https://github.com/errnoh/kafka-go.git","svn_url":"https://github.com/errnoh/kafka-go","homepage":"","size":381,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"segmentio:master","ref":"master","sha":"df82858665d07cebf1404cdaf025b435ebf7300b","user":{"login":"segmentio","id":819518,"avatar_url":"https://avatars0.githubusercontent.com/u/819518?v=4","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"repo":{"id":90798757,"name":"kafka-go","full_name":"segmentio/kafka-go","owner":{"login":"segmentio","id":819518,"avatar_url":"https://avatars0.githubusercontent.com/u/819518?v=4","gravatar_id":"","url":"https://api.github.com/users/segmentio","html_url":"https://github.com/segmentio","followers_url":"https://api.github.com/users/segmentio/followers","following_url":"https://api.github.com/users/segmentio/following{/other_user}","gists_url":"https://api.github.com/users/segmentio/gists{/gist_id}","starred_url":"https://api.github.com/users/segmentio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segmentio/subscriptions","organizations_url":"https://api.github.com/users/segmentio/orgs","repos_url":"https://api.github.com/users/segmentio/repos","events_url":"https://api.github.com/users/segmentio/events{/privacy}","received_events_url":"https://api.github.com/users/segmentio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segmentio/kafka-go","description":"Kafka library in Go","fork":false,"url":"https://api.github.com/repos/segmentio/kafka-go","forks_url":"https://api.github.com/repos/segmentio/kafka-go/forks","keys_url":"https://api.github.com/repos/segmentio/kafka-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segmentio/kafka-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segmentio/kafka-go/teams","hooks_url":"https://api.github.com/repos/segmentio/kafka-go/hooks","issue_events_url":"https://api.github.com/repos/segmentio/kafka-go/issues/events{/number}","events_url":"https://api.github.com/repos/segmentio/kafka-go/events","assignees_url":"https://api.github.com/repos/segmentio/kafka-go/assignees{/user}","branches_url":"https://api.github.com/repos/segmentio/kafka-go/branches{/branch}","tags_url":"https://api.github.com/repos/segmentio/kafka-go/tags","blobs_url":"https://api.github.com/repos/segmentio/kafka-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segmentio/kafka-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segmentio/kafka-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/segmentio/kafka-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segmentio/kafka-go/statuses/{sha}","languages_url":"https://api.github.com/repos/segmentio/kafka-go/languages","stargazers_url":"https://api.github.com/repos/segmentio/kafka-go/stargazers","contributors_url":"https://api.github.com/repos/segmentio/kafka-go/contributors","subscribers_url":"https://api.github.com/repos/segmentio/kafka-go/subscribers","subscription_url":"https://api.github.com/repos/segmentio/kafka-go/subscription","commits_url":"https://api.github.com/repos/segmentio/kafka-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/segmentio/kafka-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/segmentio/kafka-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/segmentio/kafka-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/segmentio/kafka-go/contents/{+path}","compare_url":"https://api.github.com/repos/segmentio/kafka-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segmentio/kafka-go/merges","archive_url":"https://api.github.com/repos/segmentio/kafka-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segmentio/kafka-go/downloads","issues_url":"https://api.github.com/repos/segmentio/kafka-go/issues{/number}","pulls_url":"https://api.github.com/repos/segmentio/kafka-go/pulls{/number}","milestones_url":"https://api.github.com/repos/segmentio/kafka-go/milestones{/number}","notifications_url":"https://api.github.com/repos/segmentio/kafka-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segmentio/kafka-go/labels{/name}","releases_url":"https://api.github.com/repos/segmentio/kafka-go/releases{/id}","deployments_url":"https://api.github.com/repos/segmentio/kafka-go/deployments","created_at":"2017-05-09T22:50:27Z","updated_at":"2018-03-30T02:27:06Z","pushed_at":"2018-03-30T16:53:14Z","git_url":"git://github.com/segmentio/kafka-go.git","ssh_url":"git@github.com:segmentio/kafka-go.git","clone_url":"https://github.com/segmentio/kafka-go.git","svn_url":"https://github.com/segmentio/kafka-go","homepage":"","size":470,"stargazers_count":251,"watchers_count":251,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":23,"open_issues":16,"watchers":251,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segmentio/kafka-go/pulls/88"},"html":{"href":"https://github.com/segmentio/kafka-go/pull/88"},"issue":{"href":"https://api.github.com/repos/segmentio/kafka-go/issues/88"},"comments":{"href":"https://api.github.com/repos/segmentio/kafka-go/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/segmentio/kafka-go/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/segmentio/kafka-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segmentio/kafka-go/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/segmentio/kafka-go/statuses/6d3d5472938becf41d9183157876027d2e72387e"}},"author_association":"NONE"}}
{"actor":{"display_login":"errnoh"}}