chia7712 commented on PR #16686: URL: https://github.com/apache/kafka/pull/16686#issuecomment-2379598979
> I don't see how it's possible to satisfy both of these conditions: 1. Allow the user to "forcefully close the consumer" 2. Guarantee the consumer leaves the group Yes, you're right that it's a tough issue. However, do we really need to "wait" for either the request or the background thread if users want to interrupt the close? Even though the application thread can't wait for the result of Future due to an interrupt, it still succeeds in sending a request to the background thread. Additionally, we can set closeTimeout to zero if it's in an interrupted state to let the background thread finish quickly. This essentially acts as an interrupt if the background thread respects the timeout. In short, we never give up on either closing resources or sending necessary requests, even if the thread is interrupted or the timeout is too short. Instead, we stop "waiting" if there’s an interrupt or if the timeout expires. -- 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