@Override
    public boolean isSubscribedToTopic(String topic) {
        return subscribedTopicNames.containsKey(topic);
    }
Returns true if the group is actively subscribed to the topic.

@param topic  The topic name.

@return Whether the group is subscribed to the topic.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/modern/ModernGroup.java