{"action":"created","issue":{"url":"https://api.github.com/repos/mfontanini/cppkafka/issues/54","repository_url":"https://api.github.com/repos/mfontanini/cppkafka","labels_url":"https://api.github.com/repos/mfontanini/cppkafka/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/mfontanini/cppkafka/issues/54/comments","events_url":"https://api.github.com/repos/mfontanini/cppkafka/issues/54/events","html_url":"https://github.com/mfontanini/cppkafka/pull/54","id":316339203,"number":54,"title":"Added Consumer object reference to partition callbacks","user":{"login":"accelerated","id":3112756,"avatar_url":"https://avatars3.githubusercontent.com/u/3112756?v=4","gravatar_id":"","url":"https://api.github.com/users/accelerated","html_url":"https://github.com/accelerated","followers_url":"https://api.github.com/users/accelerated/followers","following_url":"https://api.github.com/users/accelerated/following{/other_user}","gists_url":"https://api.github.com/users/accelerated/gists{/gist_id}","starred_url":"https://api.github.com/users/accelerated/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/accelerated/subscriptions","organizations_url":"https://api.github.com/users/accelerated/orgs","repos_url":"https://api.github.com/users/accelerated/repos","events_url":"https://api.github.com/users/accelerated/events{/privacy}","received_events_url":"https://api.github.com/users/accelerated/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-04-20T16:48:58Z","updated_at":"2018-04-20T23:01:29Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/mfontanini/cppkafka/pulls/54","html_url":"https://github.com/mfontanini/cppkafka/pull/54","diff_url":"https://github.com/mfontanini/cppkafka/pull/54.diff","patch_url":"https://github.com/mfontanini/cppkafka/pull/54.patch"},"body":"Added contextual reference to the consumer instance in the partition assignment callbacks. See [here](https://github.com/mfontanini/cppkafka/pull/52#issuecomment-383114054) for reasoning. Hoping this one will be accepted."},"comment":{"url":"https://api.github.com/repos/mfontanini/cppkafka/issues/comments/383243509","html_url":"https://github.com/mfontanini/cppkafka/pull/54#issuecomment-383243509","issue_url":"https://api.github.com/repos/mfontanini/cppkafka/issues/54","id":383243509,"user":{"login":"mfontanini","id":969090,"avatar_url":"https://avatars0.githubusercontent.com/u/969090?v=4","gravatar_id":"","url":"https://api.github.com/users/mfontanini","html_url":"https://github.com/mfontanini","followers_url":"https://api.github.com/users/mfontanini/followers","following_url":"https://api.github.com/users/mfontanini/following{/other_user}","gists_url":"https://api.github.com/users/mfontanini/gists{/gist_id}","starred_url":"https://api.github.com/users/mfontanini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mfontanini/subscriptions","organizations_url":"https://api.github.com/users/mfontanini/orgs","repos_url":"https://api.github.com/users/mfontanini/repos","events_url":"https://api.github.com/users/mfontanini/events{/privacy}","received_events_url":"https://api.github.com/users/mfontanini/received_events","type":"User","site_admin":false},"created_at":"2018-04-20T23:01:29Z","updated_at":"2018-04-20T23:01:29Z","author_association":"OWNER","body":"> it's just the extra work to be done when in reality you have all the info there and you can just pass it as a parameter\r\n\r\nOne could say the exact same thing about your solution. Why bind the consumer you're setting the callback on? You have the consumer right there when setting your callback so you could just bind it.\r\n\r\nI'm thinking of asynchronous event libraries I've used and can only remember boost.asio right now but it follows this same idea: no callbacks are called with a reference to the object that triggers the event. Why would the class that generates an event (`Consumer` in this case) need to pass itself to a callback that was explicitly handed to it? I think it makes more sense to not do that and if the user actually needs that, they are free to do so."}}
{"actor":{"display_login":"mfontanini"}}