Interface TaskAssignor


@Public @Evolving public interface TaskAssignor
Server side task assignor used by streams groups.

Implementations must be thread-safe.

  • Method Summary

    Modifier and Type
    Method
    Description
    assign(GroupSpec groupSpec, TopologyDescriber topologyDescriber)
    Assigns tasks to group members based on the given assignment specification and topic metadata.
    Unique name for this assignor.
  • Method Details

    • name

      String name()
      Unique name for this assignor. Used in configuration to select this assignor.
    • assign

      GroupAssignment assign(GroupSpec groupSpec, TopologyDescriber topologyDescriber) throws TaskAssignorException
      Assigns tasks to group members based on the given assignment specification and topic metadata.
      Parameters:
      groupSpec - The assignment spec which includes member metadata.
      topologyDescriber - The task metadata describer.
      Returns:
      The new assignment for the group.
      Throws:
      TaskAssignorException - If the assignment cannot be computed.