public synchronized ProcessorTopology buildTopology() {
        final Set<String> allNodes = new HashSet<>();
        for (final Set<String> value : nodeGroups().values()) {
            allNodes.addAll(value);
        }
        allNodes.removeAll(globalNodeGroups());

        initializeSubscription();
        initializeSubtopologyIdToStateStoreNamesMap();
        return build(allNodes);
    }
@return the full topology minus any global state
streams/src/main/java/org/apache/kafka/streams/processor/internals/InternalTopologyBuilder.java