Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
titleConsumerCoordinator::performAssignment
// current callcode
...
Map<String, Assignment> assignment = assignor.assign(metadata.fetch(), subscriptions);
...

// new callrevised code
...
Map<String, Assignment> assignment = assignor.assign(metadata.fetch(), subscriptions, latestGeneration().generationId); 
...

Note that when this call is made the group is rebalancing and, therefore, the call to existing generation() method will return null. A new latestGeneration() method will be created in AbstractCoordinator to return the latest generation irrespective of the group status.

...