You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Dennis Reiter (JIRA)" <ji...@apache.org> on 2018/09/27 08:32:00 UTC

[jira] [Created] (KAFKA-7445) Branch one Stream in multiple Streams

Dennis Reiter created KAFKA-7445:
------------------------------------

             Summary: Branch one Stream in multiple Streams
                 Key: KAFKA-7445
                 URL: https://issues.apache.org/jira/browse/KAFKA-7445
             Project: Kafka
          Issue Type: New Feature
          Components: streams
            Reporter: Dennis Reiter


Hi,

I need to branch/split KStreams in multiple independent KStreams. I thought, {{org.apache.kafka.streams.kstream.internals.KStreamImpl#branch}} is the right one but in fact, its designed for another purpose.
In contrast to {{branch}} I need to assign the record to *all* matching streams, not only one stream.

Speaking in code ({{org.apache.kafka.streams.kstream.internals.KStreamBranch}}):
{code:java}
if (predicates[i].test(key, value)) {
   // use forward with childIndex here
   // and pipe the record to multiple streams
   context().forward(key, value, i);
}
{code}

My question: is this still possible with features already included in Streams? Or shall I propose a change?

Thanks in advance
Dennis



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)