[
https://issues.apache.org/jira/browse/KAFKA-16985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868492#comment-17868492
]
Lianet Magrans commented on KAFKA-16985:
----------------------------------------
Hey, yes, my take is that we need to ensure the consumer sends the leave group
request even if timeout 0, to ensure that the broker does not keep that member
registered. This btw, is what the legacy consumer achieves on close with
timeout 0: sends the leave group on the coordinator close
[here|https://github.com/apache/kafka/blob/a38829e61b9b4f8efce7ac7e7ca47c86e240e790/clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java#L1132],
regardless of the timer.
> Ensure consumer sends leave request on close even if interrupted
> ----------------------------------------------------------------
>
> Key: KAFKA-16985
> URL: https://issues.apache.org/jira/browse/KAFKA-16985
> Project: Kafka
> Issue Type: Bug
> Components: clients, consumer
> Reporter: Lianet Magrans
> Assignee: Kirk True
> Priority: Major
> Fix For: 3.9.0
>
>
> While running some stress tests we found out consumers were not leaving the
> group if interrupted while closing (leading to members getting eventually
> fenced after the session expired). On close, the consumer generates an
> Unsubscribe event to be handled in the background, but we noticed that the
> network thread failed with the interruption, seemingly not sending the unsent
> requests. We should review this to ensure that a member does a clean leave,
> notifying the coordinator with a leave HB, even if in a fire-and-forget mode
> in the case of interruption (and validate the legacy consumer behaviour in
> this scenario). (Still under investigation, I'll update more info as I
> discover it)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)