{"action":"created","issue":{"url":"https://api.github.com/repos/wvanbergen/kafka/issues/106","repository_url":"https://api.github.com/repos/wvanbergen/kafka","labels_url":"https://api.github.com/repos/wvanbergen/kafka/issues/106/labels{/name}","comments_url":"https://api.github.com/repos/wvanbergen/kafka/issues/106/comments","events_url":"https://api.github.com/repos/wvanbergen/kafka/issues/106/events","html_url":"https://github.com/wvanbergen/kafka/issues/106","id":179940584,"number":106,"title":"The best practice of handling offsets of asynchronous consuming?","user":{"login":"thrieu","id":4617698,"avatar_url":"https://avatars.githubusercontent.com/u/4617698?v=3","gravatar_id":"","url":"https://api.github.com/users/thrieu","html_url":"https://github.com/thrieu","followers_url":"https://api.github.com/users/thrieu/followers","following_url":"https://api.github.com/users/thrieu/following{/other_user}","gists_url":"https://api.github.com/users/thrieu/gists{/gist_id}","starred_url":"https://api.github.com/users/thrieu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thrieu/subscriptions","organizations_url":"https://api.github.com/users/thrieu/orgs","repos_url":"https://api.github.com/users/thrieu/repos","events_url":"https://api.github.com/users/thrieu/events{/privacy}","received_events_url":"https://api.github.com/users/thrieu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-09-29T02:52:00Z","updated_at":"2016-09-29T08:45:37Z","closed_at":"2016-09-29T08:45:37Z","body":"Hi, thanks for sharing the great library!\r\nI have a case as the following, the consumer consumes the message asynchronously, so the offset may not be committed serially. What is the best practice of handling offsets to guarantee the offset committing correctly?\r\n```go\r\nfor {\r\n        select {\r\n        case m, ok := <- consumer.Messages():\r\n            if ok {\r\n                go func(m *sarama.ConsumerMessage) {\r\n                    exportMessage := worker.Ingest(m)\r\n\r\n                    // TODO: Commit the offsets\r\n                }(m)\r\n            }\r\n        }\r\n    }\r\n```"},"comment":{"url":"https://api.github.com/repos/wvanbergen/kafka/issues/comments/250406964","html_url":"https://github.com/wvanbergen/kafka/issues/106#issuecomment-250406964","issue_url":"https://api.github.com/repos/wvanbergen/kafka/issues/106","id":250406964,"user":{"login":"wvanbergen","id":15870,"avatar_url":"https://avatars.githubusercontent.com/u/15870?v=3","gravatar_id":"","url":"https://api.github.com/users/wvanbergen","html_url":"https://github.com/wvanbergen","followers_url":"https://api.github.com/users/wvanbergen/followers","following_url":"https://api.github.com/users/wvanbergen/following{/other_user}","gists_url":"https://api.github.com/users/wvanbergen/gists{/gist_id}","starred_url":"https://api.github.com/users/wvanbergen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wvanbergen/subscriptions","organizations_url":"https://api.github.com/users/wvanbergen/orgs","repos_url":"https://api.github.com/users/wvanbergen/repos","events_url":"https://api.github.com/users/wvanbergen/events{/privacy}","received_events_url":"https://api.github.com/users/wvanbergen/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T08:45:37Z","updated_at":"2016-09-29T08:45:37Z","body":"No, you just call `JoinConsumerGroup` once. Then, you simply start the application several times simultaneously. Added benefit of this is that you can do this on multiple servers."}}
{"actor":{"display_login":"wvanbergen"}}