@Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        if (!super.equals(o))
            return false;
        TaskState taskState = (TaskState) o;
        return taskId == taskState.taskId;
    }
Provides the ID of the task.

@return the task ID
connect/api/src/main/java/org/apache/kafka/connect/health/TaskState.java