lianetm commented on PR #16974:
URL: https://github.com/apache/kafka/pull/16974#issuecomment-2312333360

   > The case (close(0)) you described inspires me that processBackgroundEvents 
can return before processing ConsumerRebalanceListenerCallbackNeededEvent due 
to timeout. That means ConsumerRebalanceListener is NOT invoked and it is an 
inconsistent behavior.
   
   Yeap, that would be another case, good catch. The member would stay 
PREPARE_LEAVING (and maybe add the CallbackNeededEvent in the background), but 
if the app thread does not have the time to see it while 
`processBackgroundEvents` we would move onto the `pollOnClose`. I included this 
consideration too, so basically if leaving (preapring or leaving) when closing 
the manager, makes sense to send the leave request, it's truly to last chance 
to do it before the network layer shuts down. 
   
   All comments addressed (and merged with the nice HBMgr refactoring). Thanks!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to