Versions Compared

Key

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

...

  • The basic validations are applied. The request is rejected with the appropriate error if the validation fails.
    • The group must exist.
    • The member must exist or be created.
    • The embedded protocol must be on version >= 3.
    • The generation id must match the current member epoch. The generation id is provided in the embedded protocol.
  • The group state is updated if needed.
    • The group epoch is incremented if a new assignment is required.
    • The Topics provided in the embedded consumer protocol are used to update the SubscribedTopicNames.
    • The Protocols are converted to Assignors where the UserData become the metadata and the version is set to -1.
  • The current member assignment is updated if needed:
    • If the member has revoked all its partitions or the required partitions, the member can transition to its next epoch. The current assignment become the current assignment. The group coordinator replies with the new member epoch as the generation id.
    • If the member has to revoke partitions, the group coordinator replies with the current member epoch as the generation id.
  • The member transitions to CompletingRebalance state.

SyncGroup

...

Handling

The SyncGroup API is handled as follow:

  • The basic validations are applied.
    • The group must exist.
    • The member must exist.
    • The generation id must match the current member epoch. The generation id is provided in the embedded protocol.
  • The group coordinator replies with the current assignment. There are two cases to consider here:
    • If the member epoch is smaller than the target epoch, the coordinator replies with the intersection between the current assignment and target assignment. This is used to revoke the partitions not owned anymore. In this case, we know that the member will rejoins the group if it revokes partitions. That will automatically trigger another rebalance to collect the newly assigned partitions.
    • If the member epoch is equals to the target epoch, the coordinator replies with the current assignment - the partitions not revoked by other members yet.
  • The group coordinator serializes the assignment with the embedded consumer protocol.
  • The member transitions to Stable state.

Heartbeat

...

Handling

The Heartbeat API is handled as follow:

...