[ https://issues.apache.org/jira/browse/KAFKA-5488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16058103#comment-16058103 ]
Matthias J. Sax commented on KAFKA-5488: ---------------------------------------- Thanks for creating this JIRA. I agree that the index access is a little clumsy and support the basic idea. Details to be determined. Can you do us one favor and c&p the proposal into the JIRA itself? It's easier to tack if the ticket is self contained and does not link to external resources. Btw: this will require a KIP. Do you want to work on this by yourself? That would be great. :) > KStream.branch should not return a Array of streams we have to access by > known index > ------------------------------------------------------------------------------------ > > Key: KAFKA-5488 > URL: https://issues.apache.org/jira/browse/KAFKA-5488 > Project: Kafka > Issue Type: Improvement > Components: streams > Affects Versions: 0.11.0.0, 0.10.2.1 > Reporter: Marcel Silberhorn > Labels: needs-kip > > some details and thoughts about: > https://gitlab.com/childno.de/apache_kafka/snippets/1665655 > long story short: it's a mess to get a {{KStream<>[]}} out from > {{KStream<>branch(Predicate<>...)}}. It breaks the fluent API and it produces > bad code which is not that good to maintain since you have to know the right > index for an unnamed branching stream. > Quick idea, s.th. like {{void branch(final BranchDefinition<Predicate<>, > Consumer<KStream<>>>... branchPredicatesAndHandlers);}} where you can write > branches/streams code nested where it belongs to -- This message was sent by Atlassian JIRA (v6.4.14#64029)