kafka-php
kafka-php copied to clipboard
lost message when consumer restart
desc in the #141
i think maybe this a problem ,so i issue this issue....
@noname007 as said before we do need the test to prove that this is an issue, though... we have tests running in the last development versions saying it's not
@lcobucci I think I have found the reason for this issue, and I will create a PR to this, please review it. The reason is: when no new messages is available, the fetch request is also successful, and the message array in response is empty, but consumer also commits the offset. At this situation the consumer offset is equal to commit offset, so if you don't stop the consumer, the commit offset will be corrected by next successful fetch request, if you restart the consumer, the offset request will return the offset you committed last time.
#186 abosolutely that's not a test but the minimal code of my condition represention
@noname007 it's a great start, thanks!
also faced the problem of losing the last message
@skn2215 when it run again after exit caused by exception?