[
https://issues.apache.org/jira/browse/KAFKA-13633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17485067#comment-17485067
]
Matthias J. Sax commented on KAFKA-13633:
-----------------------------------------
Seems you close the PR...
Btw: this ticket implies a public API change and thus need to be backed by a
KIP:
[https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals]
> 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
>
> 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)