...
Note that when this call is made the group is rebalancing and, therefore, the call to to existing generation()
method will return null
. That is why a A new latestGeneration()
method is created to will be created in AbstractCoordinator
to return the latest generation irrespective of the group status.
As a result of above change to the assignor.assign(...)
call, a new method is introduced in the interface PartitionAssignor
:
Code Block | ||||
---|---|---|---|---|
| ||||
default Map<String, List<TopicPartition>> assign(Map<String, Integer> partitionsPerTopic,
Map<String, Subscription> subscriptions,
int generation) {
return assign(partitionsPerTopic, subscriptions);
} |
The existing assign(...)
method will remain to support classes that already implement this interface.
It is expected that classes that implement this interface implement at least one of the two assign(...)
methods. A default implementation (in the interface class) can be provided for both methods to allow this.
Compatibility, Deprecation, and Migration Plan
The new user data protocol can be implemented in a way that supports backward and forward compatibility.
...