{"action":"created","comment":{"url":"https://api.github.com/repos/dpkp/kafka-python/pulls/comments/62583972","id":62583972,"diff_hunk":"@@ -433,12 +434,26 @@ def _fetch(self):\n                     retry_partitions[partition] = buffer_size\n                     resp.messages.pop()\n \n-                for message in resp.messages:\n-                    if message.offset < self.fetch_offsets[partition]:\n-                        log.debug('Skipping message %s because its offset is less than the consumer offset',\n-                                  message)\n-                        continue\n-                    # Put the message in our queue\n-                    self.queue.put((partition, message))\n-                    self.fetch_offsets[partition] = message.offset + 1\n+                for off_and_msg in resp.messages:\n+                    (offset, message) = off_and_msg\n+                    # Put the messages in our queue\n+                    if message.is_compressed():\n+                        inner_messages = message.decompress()\n+                        for (offset, _msg_size, inner_msg) in inner_messages:","path":"kafka/consumer/simple.py","position":25,"original_position":25,"commit_id":"3a324cb88fd2f671087e98bc57288ebfae22aab2","original_commit_id":"3a324cb88fd2f671087e98bc57288ebfae22aab2","user":{"login":"dpkp","id":843444,"avatar_url":"https://avatars.githubusercontent.com/u/843444?v=3","gravatar_id":"","url":"https://api.github.com/users/dpkp","html_url":"https://github.com/dpkp","followers_url":"https://api.github.com/users/dpkp/followers","following_url":"https://api.github.com/users/dpkp/following{/other_user}","gists_url":"https://api.github.com/users/dpkp/gists{/gist_id}","starred_url":"https://api.github.com/users/dpkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpkp/subscriptions","organizations_url":"https://api.github.com/users/dpkp/orgs","repos_url":"https://api.github.com/users/dpkp/repos","events_url":"https://api.github.com/users/dpkp/events{/privacy}","received_events_url":"https://api.github.com/users/dpkp/received_events","type":"User","site_admin":false},"body":"might call this inner_offset to avoid the redefinition","created_at":"2016-05-09T22:26:57Z","updated_at":"2016-05-09T22:26:57Z","html_url":"https://github.com/dpkp/kafka-python/pull/684#discussion_r62583972","pull_request_url":"https://api.github.com/repos/dpkp/kafka-python/pulls/684","_links":{"self":{"href":"https://api.github.com/repos/dpkp/kafka-python/pulls/comments/62583972"},"html":{"href":"https://github.com/dpkp/kafka-python/pull/684#discussion_r62583972"},"pull_request":{"href":"https://api.github.com/repos/dpkp/kafka-python/pulls/684"}}},"pull_request":{"url":"https://api.github.com/repos/dpkp/kafka-python/pulls/684","id":69419788,"html_url":"https://github.com/dpkp/kafka-python/pull/684","diff_url":"https://github.com/dpkp/kafka-python/pull/684.diff","patch_url":"https://github.com/dpkp/kafka-python/pull/684.patch","issue_url":"https://api.github.com/repos/dpkp/kafka-python/issues/684","number":684,"state":"open","locked":false,"title":"[SimpleConsumer] Fix legacy SimpleConsumer with compressed messages","user":{"login":"paulcavallaro","id":487961,"avatar_url":"https://avatars.githubusercontent.com/u/487961?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcavallaro","html_url":"https://github.com/paulcavallaro","followers_url":"https://api.github.com/users/paulcavallaro/followers","following_url":"https://api.github.com/users/paulcavallaro/following{/other_user}","gists_url":"https://api.github.com/users/paulcavallaro/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcavallaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcavallaro/subscriptions","organizations_url":"https://api.github.com/users/paulcavallaro/orgs","repos_url":"https://api.github.com/users/paulcavallaro/repos","events_url":"https://api.github.com/users/paulcavallaro/events{/privacy}","received_events_url":"https://api.github.com/users/paulcavallaro/received_events","type":"User","site_admin":false},"body":"Summary:\r\n\r\nFix legacy SimpleConsumer with compressed messages. Decompress messages if they are compressed and add a test for the new logic.\r\n\r\nTest Plan:\r\n\r\nKAFKA_VERSION=0.9.0.1 tox -e py27 test/test_consumer_integration.py","created_at":"2016-05-09T22:13:05Z","updated_at":"2016-05-09T22:26:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"caa752542a9eb193fadd96ff1113013a01504b9c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dpkp/kafka-python/pulls/684/commits","review_comments_url":"https://api.github.com/repos/dpkp/kafka-python/pulls/684/comments","review_comment_url":"https://api.github.com/repos/dpkp/kafka-python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dpkp/kafka-python/issues/684/comments","statuses_url":"https://api.github.com/repos/dpkp/kafka-python/statuses/3a324cb88fd2f671087e98bc57288ebfae22aab2","head":{"label":"paulcavallaro:fix-legacy-gzip","ref":"fix-legacy-gzip","sha":"3a324cb88fd2f671087e98bc57288ebfae22aab2","user":{"login":"paulcavallaro","id":487961,"avatar_url":"https://avatars.githubusercontent.com/u/487961?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcavallaro","html_url":"https://github.com/paulcavallaro","followers_url":"https://api.github.com/users/paulcavallaro/followers","following_url":"https://api.github.com/users/paulcavallaro/following{/other_user}","gists_url":"https://api.github.com/users/paulcavallaro/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcavallaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcavallaro/subscriptions","organizations_url":"https://api.github.com/users/paulcavallaro/orgs","repos_url":"https://api.github.com/users/paulcavallaro/repos","events_url":"https://api.github.com/users/paulcavallaro/events{/privacy}","received_events_url":"https://api.github.com/users/paulcavallaro/received_events","type":"User","site_admin":false},"repo":{"id":58411408,"name":"kafka-python","full_name":"paulcavallaro/kafka-python","owner":{"login":"paulcavallaro","id":487961,"avatar_url":"https://avatars.githubusercontent.com/u/487961?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcavallaro","html_url":"https://github.com/paulcavallaro","followers_url":"https://api.github.com/users/paulcavallaro/followers","following_url":"https://api.github.com/users/paulcavallaro/following{/other_user}","gists_url":"https://api.github.com/users/paulcavallaro/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcavallaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcavallaro/subscriptions","organizations_url":"https://api.github.com/users/paulcavallaro/orgs","repos_url":"https://api.github.com/users/paulcavallaro/repos","events_url":"https://api.github.com/users/paulcavallaro/events{/privacy}","received_events_url":"https://api.github.com/users/paulcavallaro/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulcavallaro/kafka-python","description":"Python client for Apache Kafka","fork":true,"url":"https://api.github.com/repos/paulcavallaro/kafka-python","forks_url":"https://api.github.com/repos/paulcavallaro/kafka-python/forks","keys_url":"https://api.github.com/repos/paulcavallaro/kafka-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulcavallaro/kafka-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulcavallaro/kafka-python/teams","hooks_url":"https://api.github.com/repos/paulcavallaro/kafka-python/hooks","issue_events_url":"https://api.github.com/repos/paulcavallaro/kafka-python/issues/events{/number}","events_url":"https://api.github.com/repos/paulcavallaro/kafka-python/events","assignees_url":"https://api.github.com/repos/paulcavallaro/kafka-python/assignees{/user}","branches_url":"https://api.github.com/repos/paulcavallaro/kafka-python/branches{/branch}","tags_url":"https://api.github.com/repos/paulcavallaro/kafka-python/tags","blobs_url":"https://api.github.com/repos/paulcavallaro/kafka-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulcavallaro/kafka-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulcavallaro/kafka-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulcavallaro/kafka-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulcavallaro/kafka-python/statuses/{sha}","languages_url":"https://api.github.com/repos/paulcavallaro/kafka-python/languages","stargazers_url":"https://api.github.com/repos/paulcavallaro/kafka-python/stargazers","contributors_url":"https://api.github.com/repos/paulcavallaro/kafka-python/contributors","subscribers_url":"https://api.github.com/repos/paulcavallaro/kafka-python/subscribers","subscription_url":"https://api.github.com/repos/paulcavallaro/kafka-python/subscription","commits_url":"https://api.github.com/repos/paulcavallaro/kafka-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulcavallaro/kafka-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulcavallaro/kafka-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulcavallaro/kafka-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulcavallaro/kafka-python/contents/{+path}","compare_url":"https://api.github.com/repos/paulcavallaro/kafka-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulcavallaro/kafka-python/merges","archive_url":"https://api.github.com/repos/paulcavallaro/kafka-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulcavallaro/kafka-python/downloads","issues_url":"https://api.github.com/repos/paulcavallaro/kafka-python/issues{/number}","pulls_url":"https://api.github.com/repos/paulcavallaro/kafka-python/pulls{/number}","milestones_url":"https://api.github.com/repos/paulcavallaro/kafka-python/milestones{/number}","notifications_url":"https://api.github.com/repos/paulcavallaro/kafka-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulcavallaro/kafka-python/labels{/name}","releases_url":"https://api.github.com/repos/paulcavallaro/kafka-python/releases{/id}","deployments_url":"https://api.github.com/repos/paulcavallaro/kafka-python/deployments","created_at":"2016-05-09T22:09:03Z","updated_at":"2016-05-09T22:09:05Z","pushed_at":"2016-05-09T22:10:56Z","git_url":"git://github.com/paulcavallaro/kafka-python.git","ssh_url":"git@github.com:paulcavallaro/kafka-python.git","clone_url":"https://github.com/paulcavallaro/kafka-python.git","svn_url":"https://github.com/paulcavallaro/kafka-python","homepage":"","size":1965,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dpkp:master","ref":"master","sha":"0684302d8fa1271ad0e913972b382b00ddeab717","user":{"login":"dpkp","id":843444,"avatar_url":"https://avatars.githubusercontent.com/u/843444?v=3","gravatar_id":"","url":"https://api.github.com/users/dpkp","html_url":"https://github.com/dpkp","followers_url":"https://api.github.com/users/dpkp/followers","following_url":"https://api.github.com/users/dpkp/following{/other_user}","gists_url":"https://api.github.com/users/dpkp/gists{/gist_id}","starred_url":"https://api.github.com/users/dpkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpkp/subscriptions","organizations_url":"https://api.github.com/users/dpkp/orgs","repos_url":"https://api.github.com/users/dpkp/repos","events_url":"https://api.github.com/users/dpkp/events{/privacy}","received_events_url":"https://api.github.com/users/dpkp/received_events","type":"User","site_admin":false},"repo":{"id":5934517,"name":"kafka-python","full_name":"dpkp/kafka-python","owner":{"login":"dpkp","id":843444,"avatar_url":"https://avatars.githubusercontent.com/u/843444?v=3","gravatar_id":"","url":"https://api.github.com/users/dpkp","html_url":"https://github.com/dpkp","followers_url":"https://api.github.com/users/dpkp/followers","following_url":"https://api.github.com/users/dpkp/following{/other_user}","gists_url":"https://api.github.com/users/dpkp/gists{/gist_id}","starred_url":"https://api.github.com/users/dpkp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpkp/subscriptions","organizations_url":"https://api.github.com/users/dpkp/orgs","repos_url":"https://api.github.com/users/dpkp/repos","events_url":"https://api.github.com/users/dpkp/events{/privacy}","received_events_url":"https://api.github.com/users/dpkp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dpkp/kafka-python","description":"Python client for Apache Kafka","fork":false,"url":"https://api.github.com/repos/dpkp/kafka-python","forks_url":"https://api.github.com/repos/dpkp/kafka-python/forks","keys_url":"https://api.github.com/repos/dpkp/kafka-python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpkp/kafka-python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpkp/kafka-python/teams","hooks_url":"https://api.github.com/repos/dpkp/kafka-python/hooks","issue_events_url":"https://api.github.com/repos/dpkp/kafka-python/issues/events{/number}","events_url":"https://api.github.com/repos/dpkp/kafka-python/events","assignees_url":"https://api.github.com/repos/dpkp/kafka-python/assignees{/user}","branches_url":"https://api.github.com/repos/dpkp/kafka-python/branches{/branch}","tags_url":"https://api.github.com/repos/dpkp/kafka-python/tags","blobs_url":"https://api.github.com/repos/dpkp/kafka-python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpkp/kafka-python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpkp/kafka-python/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpkp/kafka-python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpkp/kafka-python/statuses/{sha}","languages_url":"https://api.github.com/repos/dpkp/kafka-python/languages","stargazers_url":"https://api.github.com/repos/dpkp/kafka-python/stargazers","contributors_url":"https://api.github.com/repos/dpkp/kafka-python/contributors","subscribers_url":"https://api.github.com/repos/dpkp/kafka-python/subscribers","subscription_url":"https://api.github.com/repos/dpkp/kafka-python/subscription","commits_url":"https://api.github.com/repos/dpkp/kafka-python/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpkp/kafka-python/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpkp/kafka-python/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpkp/kafka-python/issues/comments{/number}","contents_url":"https://api.github.com/repos/dpkp/kafka-python/contents/{+path}","compare_url":"https://api.github.com/repos/dpkp/kafka-python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpkp/kafka-python/merges","archive_url":"https://api.github.com/repos/dpkp/kafka-python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpkp/kafka-python/downloads","issues_url":"https://api.github.com/repos/dpkp/kafka-python/issues{/number}","pulls_url":"https://api.github.com/repos/dpkp/kafka-python/pulls{/number}","milestones_url":"https://api.github.com/repos/dpkp/kafka-python/milestones{/number}","notifications_url":"https://api.github.com/repos/dpkp/kafka-python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpkp/kafka-python/labels{/name}","releases_url":"https://api.github.com/repos/dpkp/kafka-python/releases{/id}","deployments_url":"https://api.github.com/repos/dpkp/kafka-python/deployments","created_at":"2012-09-24T13:00:26Z","updated_at":"2016-05-09T17:45:23Z","pushed_at":"2016-05-09T22:13:05Z","git_url":"git://github.com/dpkp/kafka-python.git","ssh_url":"git@github.com:dpkp/kafka-python.git","clone_url":"https://github.com/dpkp/kafka-python.git","svn_url":"https://github.com/dpkp/kafka-python","homepage":"","size":3001,"stargazers_count":855,"watchers_count":855,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":384,"mirror_url":null,"open_issues_count":50,"forks":384,"open_issues":50,"watchers":855,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dpkp/kafka-python/pulls/684"},"html":{"href":"https://github.com/dpkp/kafka-python/pull/684"},"issue":{"href":"https://api.github.com/repos/dpkp/kafka-python/issues/684"},"comments":{"href":"https://api.github.com/repos/dpkp/kafka-python/issues/684/comments"},"review_comments":{"href":"https://api.github.com/repos/dpkp/kafka-python/pulls/684/comments"},"review_comment":{"href":"https://api.github.com/repos/dpkp/kafka-python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dpkp/kafka-python/pulls/684/commits"},"statuses":{"href":"https://api.github.com/repos/dpkp/kafka-python/statuses/3a324cb88fd2f671087e98bc57288ebfae22aab2"}}}}