public synchronized List<TopicPartition> assignedPartitionsList() {
        return new ArrayList<>(this.assignment.partitionSet());
    }
@return a modifiable copy of the currently assigned partitions as a list
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java