# org.apache.kafka.common.errors.RebalanceInProgressException: Rebalance in progress; cannot complete assignment

- **ID:** `kafka/rebalance-protocol-mismatch`
- **Domain:** kafka
- **Category:** protocol_error
- **Verification:** ai_generated
- **Fix Rate:** 85%

## Root Cause

Consumer group protocol mismatch between static membership and dynamic assignment triggers rebalance loop.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.5.0 | active | — | — |
| 3.6.0 | active | — | — |
| 3.7.0 | active | — | — |

## Workarounds

1. **Set 'partition.assignment.strategy' to 'org.apache.kafka.clients.consumer.RangeAssignor' and ensure all consumers use the same protocol version.** (80% success)
   ```
   Set 'partition.assignment.strategy' to 'org.apache.kafka.clients.consumer.RangeAssignor' and ensure all consumers use the same protocol version.
   ```
2. **Disable static group membership by removing group.instance.id from consumer config and rebalance with 'KafkaConsumer#enforceRebalance'.** (85% success)
   ```
   Disable static group membership by removing group.instance.id from consumer config and rebalance with 'KafkaConsumer#enforceRebalance'.
   ```
3. **Upgrade broker to 3.7+ and enable cooperative rebalance protocol with 'CooperativeStickyAssignor'.** (90% success)
   ```
   Upgrade broker to 3.7+ and enable cooperative rebalance protocol with 'CooperativeStickyAssignor'.
   ```

## Dead Ends

- **** — Restarting does not resolve protocol mismatch; rebalance triggers again on rejoin. (90% fail)
- **** — Longer timeout delays detection but does not fix assignment logic. (70% fail)
- **** — Removing static membership may cause duplicate assignments and offset commits. (60% fail)
