public synchronized boolean hasNoSubscriptionOrUserAssignment() {
        return this.subscriptionType == SubscriptionType.NONE;
    }
Check whether pattern subscription is in use.
clients/src/main/java/org/apache/kafka/clients/consumer/internals/SubscriptionState.java