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

Matthias J. Sax commented on KAFKA-13633:
-----------------------------------------

Thanks! Will try to review the KIP soon.

> Merging multiple KStreams in one operation
> ------------------------------------------
>
>                 Key: KAFKA-13633
>                 URL: https://issues.apache.org/jira/browse/KAFKA-13633
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>    Affects Versions: 3.1.0
>            Reporter: Nicholas Telford
>            Assignee: Nicholas Telford
>            Priority: Major
>              Labels: kip
>
> The {{KStream}} API provides {{merge(KStream)}} to merge another {{KStream}} 
> with {{{}this{}}}. Sometimes, it may be useful to merge more than 2 
> {{{}KStream{}}}s together. Currently, the best way to do this is using Java's 
> {{{}Stream.reduce{}}}:
> {noformat}
> List<KStream<K, V>> streams ...;
> streams.stream().reduce((left, right) -> left.merge(right));{noformat}
> This creates a {{merge}} node in the process graph for every {{KStream}} in 
> the collection being merged.
> Complex process graphs can make understanding an application and debugging 
> more difficult, therefore, we propose a new API that creates a single 
> {{merge}} node in the process graph, irrespective of the number of 
> {{{}KStream{}}}s being merged:
> {noformat}
> KStream<K, V> merge(Collection<KStream<K, V>> streams);
> KStream<K, V> merge(Collection<K, V> streams, Named named);{noformat}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to