Interface ApplicationState
public interface ApplicationState
A read-only metadata class representing the state of the application and the current rebalance.
This class wraps all the input parameters to the task assignment, including the current state
of each KafkaStreams client with at least one StreamThread participating in this rebalance, the
assignment-related configs, and the tasks to be assigned.
-
Method Summary
-
Method Details
-
kafkaStreamsStates
- Parameters:
computeTaskLags
- whether to include task lag information in the returned metadata. Note that passing in "true" will result in a remote call to fetch changelog topic end offsets, and you should pass in "false" unless you specifically need the task lag information.- Returns:
- a map from the
processId
toKafkaStreamsState
for all KafkaStreams clients in this app - Throws:
TaskAssignmentException
- if a retriable error occurs while computing KafkaStreamsState metadata. Re-throw this exception to have Kafka Streams retry the rebalance by returning the same assignment and scheduling an immediate followup rebalance
-
assignmentConfigs
AssignmentConfigs assignmentConfigs()- Returns:
- a simple container class with the Streams configs relevant to assignment
-
allTasks
- Returns:
- a map of task ids to all tasks in this topology to be assigned
-