On Tue, Feb 14, 2017 at 9:37 AM, Damian Guy <damian....@gmail.com> wrote:
> > And about printing the topology for debuggability: I agrees this is a > > > potential drawback, and I'd suggest maintain some functionality to > build > > a > > > "dry topology" as Mathieu suggested; the difficulty is that, internally > > we > > > need a different "copy" of the topology for each thread so that they > will > > > not share any states, so we cannot directly pass in the topology into > > > KafkaStreams instead of the topology builder. So how about adding a > > > `ToplogyBuilder#toString` function which calls `build()` internally > then > > > prints the built dry topology? > > > > > > > Well, this sounds better than KafkaStreams#toString() in that it doesn't > > require a running processor. But I'd really love to have a simple object > > model for the topology, not a string output, so that I can output my own > > debug format. I currently have that in the form of > > TopologyBuilder#nodeGroups() & TopologyBuilder#build(Integer). > > > > How about a method on TopologyBuilder that you pass a functional interface > to and it gets called once for each ProcessorTopology? We may need to add a > new public class that represents the topology (i'm not sure we want to > 'expose` ProcessorTopology as public). > That sounds awesome. Mathieu