public Set<String> groupsSubscribedToTopic(String topicName) {
        Set<String> groups = groupsByTopics.get(topicName);
        return groups != null ? groups : Collections.emptySet();
    }
@return The set of groups subscribed to the topic.
group-coordinator/src/main/java/org/apache/kafka/coordinator/group/GroupMetadataManager.java