[ https://issues.apache.org/jira/browse/KAFKA-4471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15710135#comment-15710135 ]
Jason Gustafson commented on KAFKA-4471: ---------------------------------------- [~salaev] This is actually intentional. We do not preserve the pause state across rebalances, so you have to repause the partitions in the {{onPartitionsAssigned}} callback. Since we don't have a way to preserve the pause state when a partition is moved to another consumer, applications generally have to add checks to verify the state of the partition after the rebalance completes. Otherwise some of the assigned partitions may be paused if they had been before, while others are not (if they were assigned for the first time). Since applications need to handle this anyway, it seemed simpler to start all partitions in a clean state. Similarly, we do not preserve the transient (uncommitted) position of the consumer for a partition: after rebalancing, each consumer looks up the last committed offset and sets its position accordingly. > KafkaConsumer unpauses partitions after subscribe() > --------------------------------------------------- > > Key: KAFKA-4471 > URL: https://issues.apache.org/jira/browse/KAFKA-4471 > Project: Kafka > Issue Type: Bug > Components: clients > Affects Versions: 0.10.0.0 > Reporter: Sergey Alaev > Assignee: Vahid Hashemian > > How to reproduce: > 1. initialize KafkaConsumer and subscribe to some topics by calling `void > subscribe(Collection<String> topics)` > 2. pause some subscribed partitions > 3. call `void subscribe(Collection<String> topics)` with one more topic > 4. paused partitions will unpause. > We are using 3-node Kafka cluster, server version = client version = > 0.10.0.0., one partition per topic > Note: > There was another problem with 0.9.x - that client did not purge unsubscribed > queues if they are paused. Probably that got 'fixed'. -- This message was sent by Atlassian JIRA (v6.3.4#6332)