You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthew de Detrich (Jira)" <ji...@apache.org> on 2022/06/02 11:25:00 UTC

[jira] [Assigned] (KAFKA-8420) Graceful handling when consumer switches from subscribe to manual assign

     [ https://issues.apache.org/jira/browse/KAFKA-8420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew de Detrich reassigned KAFKA-8420:
-----------------------------------------

    Assignee: Matthew de Detrich

> Graceful handling when consumer switches from subscribe to manual assign
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-8420
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8420
>             Project: Kafka
>          Issue Type: Improvement
>          Components: consumer
>            Reporter: Guozhang Wang
>            Assignee: Matthew de Detrich
>            Priority: Major
>
> Today if a consumer switches between subscribe (and hence relies on group rebalance to get assignment) and manual assign, it may cause unnecessary rebalances. For example:
> 1. consumer.subscribe();
> 2. consumer.poll();     // join-group request sent, returns empty because poll timeout
> 3. consumer.unsubscribe();
> 4. consumer.assign(..);
> 5. consumer.poll();     // sync-group request received, and the assigned partitions does not match the current subscription-state. In this case it will tries to re-join which is not necessary.
> In the worst case (i.e. leader keep sending incompatible assignment), this would case the consumer to fall into endless re-joins.
> Although it is not a very common usage scenario, it still worth being better handled than the status-quo.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)