{"action":"created","issue":{"url":"https://api.github.com/repos/edenhill/kafkacat/issues/56","labels_url":"https://api.github.com/repos/edenhill/kafkacat/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/edenhill/kafkacat/issues/56/comments","events_url":"https://api.github.com/repos/edenhill/kafkacat/issues/56/events","html_url":"https://github.com/edenhill/kafkacat/issues/56","id":121814382,"number":56,"title":"kafkacat -c -NUM semantics edge case","user":{"login":"cavanaug","id":59479,"avatar_url":"https://avatars.githubusercontent.com/u/59479?v=3","gravatar_id":"","url":"https://api.github.com/users/cavanaug","html_url":"https://github.com/cavanaug","followers_url":"https://api.github.com/users/cavanaug/followers","following_url":"https://api.github.com/users/cavanaug/following{/other_user}","gists_url":"https://api.github.com/users/cavanaug/gists{/gist_id}","starred_url":"https://api.github.com/users/cavanaug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cavanaug/subscriptions","organizations_url":"https://api.github.com/users/cavanaug/orgs","repos_url":"https://api.github.com/users/cavanaug/repos","events_url":"https://api.github.com/users/cavanaug/events{/privacy}","received_events_url":"https://api.github.com/users/cavanaug/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-11T23:43:53Z","updated_at":"2015-12-12T20:01:52Z","closed_at":null,"body":"Here is the use-case.     A topic with say 150 messages.   \r\n\r\n$kafkacat -b broker -C -q -o -1000 -e -c 1000 -t topic | wc -l\r\n0\r\n\r\n$kafkacat -b broker -C -q -o -100 -e -c 1000 -t topic | wc -l\r\n100\r\n\r\nWhat this shows is that if the negative offset is larger than available it doesnt return anything.    Semantically I believe this should just return from the beginning then.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/edenhill/kafkacat/issues/comments/164185752","html_url":"https://github.com/edenhill/kafkacat/issues/56#issuecomment-164185752","issue_url":"https://api.github.com/repos/edenhill/kafkacat/issues/56","id":164185752,"user":{"login":"edenhill","id":524990,"avatar_url":"https://avatars.githubusercontent.com/u/524990?v=3","gravatar_id":"","url":"https://api.github.com/users/edenhill","html_url":"https://github.com/edenhill","followers_url":"https://api.github.com/users/edenhill/followers","following_url":"https://api.github.com/users/edenhill/following{/other_user}","gists_url":"https://api.github.com/users/edenhill/gists{/gist_id}","starred_url":"https://api.github.com/users/edenhill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edenhill/subscriptions","organizations_url":"https://api.github.com/users/edenhill/orgs","repos_url":"https://api.github.com/users/edenhill/repos","events_url":"https://api.github.com/users/edenhill/events{/privacy}","received_events_url":"https://api.github.com/users/edenhill/received_events","type":"User","site_admin":false},"created_at":"2015-12-12T20:01:52Z","updated_at":"2015-12-12T20:01:52Z","body":"Hey,\r\n\r\nI can't reproduce this on latest kafkacat master (with latest librdkafka master).\r\nWhat version are you on?\r\n\r\n\r\n````\r\nmaglun@bib:~$ kafkacat -b localhost -q -o beginning -e -t newt2 | wc -l\r\n100\r\nmaglun@bib:~$ kafkacat -b localhost -q -o -1000 -e -c 1000 -t newt2 | wc -l\r\n100\r\nmaglun@bib:~$ kafkacat -b localhost -q -o -75 -e -c 1000 -t newt2 | wc -l\r\n75\r\n````"}}