Skip to content

Do Not Resume Paused Partitions After a Rebalance #2222

@garyrussell

Description

@garyrussell

If individual partitions are paused (by @RetryableTopic or by users), they will be resumed by a rebalance.

While this is not really a problem for @RetryableTopic, because the partition will be automatically paused again, but it is a problem for user-paused partitions.

We already handle this case when the whole container is paused, we need something similar for paused partitions.

if (ListenerConsumer.this.consumerPaused) {
ListenerConsumer.this.consumer.pause(partitions);
ListenerConsumer.this.logger.warn("Paused consumer resumed by Kafka due to rebalance; "
+ "consumer paused again, so the initial poll() will never return any records");
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions