Is there a way to make branch-like operation but to place record in each output stream which predicate evaluates to true? Brach puts record to first match (documentation: A reco
I think you can use something like this:
KStream inputStream = builder.stream("input");
List> predicates = new ArrayList<>(); // <-- list of predicates
List> kStreams = predicates.stream()
.map(inputStream::branch)
.map(Arrays::asList)
.map(listOfOneElementKStreams -> listOfOneElementKStreams.get(0)).collect(Collectors.toList());