[ https://issues.apache.org/jira/browse/KAFKA-3664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15276643#comment-15276643 ]
Jason Gustafson commented on KAFKA-3664: ---------------------------------------- I'm not sure either, but I think the current invariant, which maintains that only partitions from subscribed topics are present in both {{assignment()}} and in the rebalance callbacks seems nice and intuitive. Perhaps we could leave partitions in the {{PendingUnsubscribe}} state out of the revocation callback, but still commit offsets for them when autocommit is enabled? This means that users who are managing offsets themselves will have to clean up partition state when they unsubscribe from a topic, which may be less than ideal, but not unreasonable. > When subscription set changes on new consumer, the partitions may be removed > without offset being committed. > ------------------------------------------------------------------------------------------------------------ > > Key: KAFKA-3664 > URL: https://issues.apache.org/jira/browse/KAFKA-3664 > Project: Kafka > Issue Type: Bug > Reporter: Jiangjie Qin > Assignee: Vahid Hashemian > > When users are using group management, if they call consumer.subscribe() to > change the subscription, the removed subscriptions will be immediately > removed and their offset will not be commit. Also the revoked partitions > passed to the ConsumerRebalanceListener.onPartitionsRevoked() will not > include those partitions. -- This message was sent by Atlassian JIRA (v6.3.4#6332)