@Unstable public interface GroupSpec
The group metadata specifications required to compute the target assignment.
  • Method Details

    • memberIds

      Collection<String> memberIds()
      Returns:
      All the member Ids of the consumer group.
    • subscriptionType

      SubscriptionType subscriptionType()
      Returns:
      The group's subscription type.
    • isPartitionAssigned

      boolean isPartitionAssigned(Uuid topicId, int partitionId)
      Returns:
      True, if the partition is currently assigned to a member. False, otherwise.
    • memberSubscription

      MemberSubscription memberSubscription(String memberId)
      Gets the member subscription specification for a member.
      Parameters:
      memberId - The member Id.
      Returns:
      The member's subscription metadata.
      Throws:
      IllegalArgumentException - If the member Id isn't found.
    • memberAssignment

      MemberAssignment memberAssignment(String memberId)
      Gets the current assignment of the member.
      Parameters:
      memberId - The member Id.
      Returns:
      The member's assignment or an empty assignment if the member does not have one.