Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

 

Status

Current stateUnder Discussion

...

Please keep the discussion on the mailing list rather than commenting on the wiki (wiki discussions get unwieldy fast).

Motivation

Merging multiple KStreams is done via StreamsBuilder's merge() (formally KStreamsBuilder's merge()). This is quite unnatural and should be done via KStream's merge().

Public Interfaces

We will add a merge() method to the KStream interface.

static <K,V> KStream<K,V> merge(StreamsBuilder builder, KStream<K,V> ... streams);

Proposed Changes

Originally, the method merge() was defined in StreamsBuilder. Through a series of calls, it called a merge() method in KStreamImpl seperate from the one we are adding. 

...

    return builder.merge(streams);

}

Compatibility, Deprecation, and Migration Plan

We will deprecate the old merge() method inside StreamsBuilder. Classes (or systems) calling the old, deprecated method will have to switch to calling the new one

in KStreamImpl. 

Rejected Alternatives