public OffsetResetStrategy offsetResetStrategy(final String topic) {
        if (maybeDecorateInternalSourceTopics(earliestResetTopics).contains(topic) ||
            earliestResetPatterns.stream().anyMatch(p -> p.matcher(topic).matches())) {
            return EARLIEST;
        } else if (maybeDecorateInternalSourceTopics(latestResetTopics).contains(topic) ||
            latestResetPatterns.stream().anyMatch(p -> p.matcher(topic).matches())) {
            return LATEST;
        } else if (containsTopic(topic)) {
            return NONE;
        } else {
            throw new IllegalStateException(String.format(
                "Unable to lookup offset reset strategy for the following topic as it does not exist in the topology%s: %s",
                hasNamedTopology() ? topologyName : "",
                topic)
            );
        }
    }
Returns the map of topic groups keyed by the group id.
A topic group is a group of topics in the same task.

@return groups of topic names
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java