private void updateSubscription(SortedSet<TopicIdPartition> assignedPartitions) {
        Collection<TopicPartition> assignedTopicPartitions = toTopicPartitionSet(assignedPartitions);
        if (subscriptions.hasAutoAssignedPartitions()) {
            subscriptions.assignFromSubscribed(assignedTopicPartitions);
        }
        updateAssignment(assignedPartitions);
    }
Update a new assignment by setting the assigned partitions in the member subscription.

@param assignedPartitions Topic partitions to take as the new subscription assignment
clients/src/main/java/org/apache/kafka/clients/consumer/internals/ShareMembershipManager.java