Interface PartitionAssignor
- All Known Subinterfaces:
ConsumerGroupPartitionAssignor
Server-side partition assignor used by the GroupCoordinator.
The new consumer group protocol is in preview so this interface is considered
unstable until Apache Kafka 4.0.
-
Method Summary
Modifier and TypeMethodDescriptionassign(GroupSpec groupSpec, SubscribedTopicDescriber subscribedTopicDescriber) Assigns partitions to group members based on the given assignment specification and topic metadata.name()Unique name for this assignor.
-
Method Details
-
name
String name()Unique name for this assignor. -
assign
GroupAssignment assign(GroupSpec groupSpec, SubscribedTopicDescriber subscribedTopicDescriber) throws PartitionAssignorException Assigns partitions to group members based on the given assignment specification and topic metadata.- Parameters:
groupSpec- The assignment spec which includes member metadata.subscribedTopicDescriber- The topic and partition metadata describer.- Returns:
- The new assignment for the group.
- Throws:
PartitionAssignorException
-