class TopologyUtils {

    public static Set<String> getSinkTopics(final TopologyDescription topology) {
        final Set<String> topics = new HashSet<>();
        topology.subtopologies().forEach(sub ->
            sub.nodes().forEach(n -> {
                if (n instanceof TopologyDescription.Sink) {
                    topics.add(((TopologyDescription.Sink) n).topic());
                }
            })
        );
        return topics;
    }

}