[ 
https://issues.apache.org/jira/browse/KAFKA-16758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17846180#comment-17846180
 ] 

A. Sophie Blee-Goldman commented on KAFKA-16758:
------------------------------------------------

I'm not super familiar with the new consumer, but for the legacy one at least I 
can say this should be very straightforward to implement, so I was thinking 
about applying the "newbie" label. Does anyone have a sense of whether this 
would be straightforward in the new consumer as well?

FWIW I personally do not have time to pick up the KIP anytime soon (though I'd 
be happy to help shepherd/review it) but I do frequently get asked about good 
starter work by new contributors, so I'm just wondering if this one would be a 
reasonable addition to the list. [~lianetm] [~schofielaj] [~dajac] any thoughts?

> Extend Consumer#close with option to leave the group or not
> -----------------------------------------------------------
>
>                 Key: KAFKA-16758
>                 URL: https://issues.apache.org/jira/browse/KAFKA-16758
>             Project: Kafka
>          Issue Type: New Feature
>          Components: consumer
>            Reporter: A. Sophie Blee-Goldman
>            Priority: Major
>              Labels: needs-kip
>
> See comments on https://issues.apache.org/jira/browse/KAFKA-16514 for the 
> full context.
> Essentially we would get rid of the "internal.leave.group.on.close" config 
> that is used as a backdoor by Kafka Streams right now to prevent closed 
> consumers from leaving the group, thus reducing unnecessary task movements 
> after a simple bounce. 
> This would be replaced by an actual public API that would allow the caller to 
> opt in or out to the LeaveGroup when close is called. This would be similar 
> to the KafkaStreams#close(CloseOptions) API, and in fact would be how that 
> API will be implemented (since it only works for static groups at the moment 
> as noted in KAFKA-16514 )
> This has several benefits over the current situation:
>  # It allows plain consumer apps to opt-out of leaving the group when closed, 
> which is currently not possible through any public API (only an internal 
> backdoor config)
>  # It enables the caller to dynamically select the appropriate action 
> depending on why the client is being closed – for example, you would not want 
> the consumer to leave the group during a simple restart, but would want it to 
> leave the group when shutting down the app or if scaling down the node. This 
> is not possible today, even with the internal config, since configs are 
> immutable
>  # It can be leveraged to "fix" the KafkaStreams#close(closeOptions) API so 
> that the user's choice to leave the group during close will be respected for 
> non-static members



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to