Only the partitions that actually move are revoked, so most consumers keep working.
props.put(ConsumerConfig.PARTITION_ASSIGNMENT_STRATEGY_CONFIG,
CooperativeStickyAssignor.class.getName());
Eager: every consumer stops, everything is reassigned
Cooperative: one partition moves, the other five consumers never pause
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-11