public String toString(final String indent) {
        final Map<SourceNode<?, ?>, List<String>> sourceToTopics = new HashMap<>();
        for (final Map.Entry<String, SourceNode<?, ?>> sourceNodeEntry : sourceNodesByTopic.entrySet()) {
            final String topic = sourceNodeEntry.getKey();
            final SourceNode<?, ?> source = sourceNodeEntry.getValue();
            sourceToTopics.computeIfAbsent(source, s -> new ArrayList<>());
            sourceToTopics.get(source).add(topic);
        }

        final StringBuilder sb = new StringBuilder(indent + "ProcessorTopology:\n");

        // start from sources
        for (final Map.Entry<SourceNode<?, ?>, List<String>> sourceNodeEntry : sourceToTopics.entrySet()) {
            final SourceNode<?, ?> source = sourceNodeEntry.getKey();
            final List<String> topics = sourceNodeEntry.getValue();
            sb.append(source.toString(indent + "\t"))
                .append(topicsToString(indent + "\t", topics))
                .append(childrenToString(indent + "\t", source.children()));
        }
        return sb.toString();
    }
Produces a string representation containing useful information this topology.
This is useful in debugging scenarios.
@return A string representation of this instance.
streams/src/main/java/org/apache/kafka/streams/processor/internals/ProcessorTopology.java