Versions Compared

Key

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

...

Code Block
languagejava
titleMethods Added to KStream
<VO, VR> KStream<K, VR> join(final KStream<K, VO> otherStream,
                             final ValueJoiner<? super V, ? super VO, ? extends VR> joiner,
                             final JoinWindows windows,
                             final Joined<K, V, VO> joined,
                             final Materialized materialized);

<VO, VR> KStream<K, VR> leftJoin(final KStream<K, VO> otherStream,
                                 final ValueJoiner<? super V, ? super VO, ? extends VR> joiner,
                                 final JoinWindows windows,
                                 final Joined<K, V, VO> joined,
                                 final Materialized materialized);

<VO, VR> KStream<K, VR> outerJoin(final KStream<K, VO> otherStream,
                                  final ValueJoiner<? super V, ? super VO, ? extends VR> joiner,
                                  final JoinWindows windows,
                                  final Joined<K, V, VO> joined,
                                  final Materialized materialized);

This KIP will also add the following methods to the Materialized class

Code Block
languagejava
titleMethods Added to Materialized
public Materialized<K, V, S> withQuerryingDisabled()
public Materialized<K, V, S> withQuerryingEnabled()


Proposed Changes

With this in mind, this KIP aims to add an overloaded KStream#join method accepting a Materialized parameter. The overloads will apply to all flavors of KStream#join (join, left, and outer). This will allow for users who wish to upgrade to 2.4 without having to make a breaking change. Now the Joined#as method will only name the Join processor and repartition topics and no longer name the associated state stores and changelog topics. So if users wish to upgrade to 2.4 and don't provide a name for the states stores, it will continue to use the auto-generated name in 2.3. Of course, if users elect to name the state stores, they can do so via Materialized, and it is recommended they do to pin the changelog topic names in case of any upstream topology changes.

Additionally, we'll add methods to Materialized withQueryingEnabled and withQueryingDisabled. There are a few reasons for adding these methods to Materialized.

...

We should note that adding a Materialized object to join, will not enable interactive queries over the join state stores and we'll update the documentation stating as much.

Compatibility, Deprecation, and Migration Plan

...