{"action":"created","issue":{"url":"https://api.github.com/repos/Parsely/pykafka/issues/618","repository_url":"https://api.github.com/repos/Parsely/pykafka","labels_url":"https://api.github.com/repos/Parsely/pykafka/issues/618/labels{/name}","comments_url":"https://api.github.com/repos/Parsely/pykafka/issues/618/comments","events_url":"https://api.github.com/repos/Parsely/pykafka/issues/618/events","html_url":"https://github.com/Parsely/pykafka/pull/618","id":192032156,"number":618,"title":"Populate common.Message.offset field when producer gets ack from broker","user":{"login":"kmgv","id":2827546,"avatar_url":"https://avatars.githubusercontent.com/u/2827546?v=3","gravatar_id":"","url":"https://api.github.com/users/kmgv","html_url":"https://github.com/kmgv","followers_url":"https://api.github.com/users/kmgv/followers","following_url":"https://api.github.com/users/kmgv/following{/other_user}","gists_url":"https://api.github.com/users/kmgv/gists{/gist_id}","starred_url":"https://api.github.com/users/kmgv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmgv/subscriptions","organizations_url":"https://api.github.com/users/kmgv/orgs","repos_url":"https://api.github.com/users/kmgv/repos","events_url":"https://api.github.com/users/kmgv/events{/privacy}","received_events_url":"https://api.github.com/users/kmgv/received_events","type":"User","site_admin":false},"labels":[{"id":266824885,"url":"https://api.github.com/repos/Parsely/pykafka/labels/backlog","name":"backlog","color":"009800","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-28T15:18:14Z","updated_at":"2016-11-29T23:13:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Parsely/pykafka/pulls/618","html_url":"https://github.com/Parsely/pykafka/pull/618","diff_url":"https://github.com/Parsely/pykafka/pull/618.diff","patch_url":"https://github.com/Parsely/pykafka/pull/618.patch"},"body":"Hello!\r\n\r\nIn my use case I need to get synchronously produce messages to kafka. It can be done by setting up `Producer` in `sync` mode which is ok.\r\n\r\nAlso I need to get offset of every message I send to kafka (or last message send to particular partition) hence I can't use `sync` mode because then delivery report for message get taken from queue before anything can be done about it. Simple solution is to wait for delivery report myself then get offset from `reported_msg` object. But `offet` field is aways emty. Kafka broker returns offset of last message in batch when it sends ack back but this information is never set on `Message` object.\r\n\r\nOther solution is use `fetch_offset_limit` after each message but this is unnecessary roundtrip for data that is sent back anyway."},"comment":{"url":"https://api.github.com/repos/Parsely/pykafka/issues/comments/263730874","html_url":"https://github.com/Parsely/pykafka/pull/618#issuecomment-263730874","issue_url":"https://api.github.com/repos/Parsely/pykafka/issues/618","id":263730874,"user":{"login":"emmett9001","id":723615,"avatar_url":"https://avatars.githubusercontent.com/u/723615?v=3","gravatar_id":"","url":"https://api.github.com/users/emmett9001","html_url":"https://github.com/emmett9001","followers_url":"https://api.github.com/users/emmett9001/followers","following_url":"https://api.github.com/users/emmett9001/following{/other_user}","gists_url":"https://api.github.com/users/emmett9001/gists{/gist_id}","starred_url":"https://api.github.com/users/emmett9001/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emmett9001/subscriptions","organizations_url":"https://api.github.com/users/emmett9001/orgs","repos_url":"https://api.github.com/users/emmett9001/repos","events_url":"https://api.github.com/users/emmett9001/events{/privacy}","received_events_url":"https://api.github.com/users/emmett9001/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T23:13:06Z","updated_at":"2016-11-29T23:13:06Z","body":"@kmgv After taking a look, this seems great. I'll probably move your changes into `mark_as_delivered` for code clarity, but the substance of this change is certainly an improvement. Assuming the tests all pass, I'll merge this. Thanks for your contribution!"}}
{"actor":{"display_login":"emmett9001"}}