public synchronized boolean hasAutoAssignedPartitions() {
        return this.subscriptionType == SubscriptionType.AUTO_TOPICS || this.subscriptionType == SubscriptionType.AUTO_PATTERN
                || this.subscriptionType == SubscriptionType.AUTO_TOPICS_SHARE;
    }
Provides the number of assigned partitions in a thread safe manner.
@return the number of assigned partitions.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java