{"action":"created","issue":{"url":"https://api.github.com/repos/Shopify/sarama/issues/549","labels_url":"https://api.github.com/repos/Shopify/sarama/issues/549/labels{/name}","comments_url":"https://api.github.com/repos/Shopify/sarama/issues/549/comments","events_url":"https://api.github.com/repos/Shopify/sarama/issues/549/events","html_url":"https://github.com/Shopify/sarama/pull/549","id":109120561,"number":549,"title":"Refactor the producer, part 1","user":{"login":"eapache","id":1706826,"avatar_url":"https://avatars.githubusercontent.com/u/1706826?v=3","gravatar_id":"","url":"https://api.github.com/users/eapache","html_url":"https://github.com/eapache","followers_url":"https://api.github.com/users/eapache/followers","following_url":"https://api.github.com/users/eapache/following{/other_user}","gists_url":"https://api.github.com/users/eapache/gists{/gist_id}","starred_url":"https://api.github.com/users/eapache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eapache/subscriptions","organizations_url":"https://api.github.com/users/eapache/orgs","repos_url":"https://api.github.com/users/eapache/repos","events_url":"https://api.github.com/users/eapache/events{/privacy}","received_events_url":"https://api.github.com/users/eapache/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-30T15:45:05Z","updated_at":"2015-10-05T15:56:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Shopify/sarama/pulls/549","html_url":"https://github.com/Shopify/sarama/pull/549","diff_url":"https://github.com/Shopify/sarama/pull/549.diff","patch_url":"https://github.com/Shopify/sarama/pull/549.patch"},"body":"First stand-alone chunk extracted from #544. This introduces and uses a\r\nproduceSet structure which takes care of collecting messages, rejecting ones\r\nwhich don't encode, and turning the rest into a `ProduceRequest`.\r\n\r\nThis has several knock-on effects:\r\n- we no longer nil out array entries, so nil checks in several places (e.g.\r\n  `returnErrors`) can be removed\r\n- parseResponse gets re-indented since it loops over the partitions in the set\r\n  via a callback now rather than a pair of nested loops\r\n- groupAndFilter is much simpler, a lot of its logic now lives in the produceSet\r\n- the flusher has to use the set to return errors/successes/retries, rather than\r\n  `batch` which may now contain messages not in the eventual request\r\n- keyCache and valueCache can be removed\r\n\r\n@wvanbergen cc @kvs "},"comment":{"url":"https://api.github.com/repos/Shopify/sarama/issues/comments/145579117","html_url":"https://github.com/Shopify/sarama/pull/549#issuecomment-145579117","issue_url":"https://api.github.com/repos/Shopify/sarama/issues/549","id":145579117,"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":"2015-10-05T15:56:08Z","updated_at":"2015-10-05T15:56:08Z","body":"This is a much easier to swallow changeset. :+1:"}}