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

2018-10-01 Thread Dennis Reiter (JIRA)


[ 
https://issues.apache.org/jira/browse/KAFKA-7445?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16633953#comment-16633953
 ] 

Dennis Reiter commented on KAFKA-7445:
--

[~mjsax]: Thanks for the hint! I will give it a try.

[~guozhang]: I didn't want to change the branching logic, just using it as an 
example.

> 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
>Priority: Minor
>
> 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)


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

2018-09-27 Thread Dennis Reiter (JIRA)
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)