private RepartitionTopicConfig buildRepartitionTopicConfig(final String internalTopic,
                                                               final Optional<Integer> numberOfPartitions) {
        return numberOfPartitions
            .map(partitions -> new RepartitionTopicConfig(internalTopic,
                                                          Collections.emptyMap(),
                                                          partitions,
                                                          true))
            .orElse(new RepartitionTopicConfig(internalTopic, Collections.emptyMap()));
    }
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