Skip to content

Instantly share code, notes, and snippets.

@jacace
Created March 8, 2021 19:46
Show Gist options
  • Save jacace/06add2ba5eb13c822d15f9dde9193a91 to your computer and use it in GitHub Desktop.
Save jacace/06add2ba5eb13c822d15f9dde9193a91 to your computer and use it in GitHub Desktop.
StreamsBuilder builder = new StreamsBuilder();
KStream<String, String> streamLeft = builder.stream("TopicIn1");
KStream<String, String> streamRight = builder.stream("TopicIn2");
KStream<String, String> joined = streamLeft.join(streamRight,
(leftValue, rightValue) -> "left=" + leftValue + ", right=" + rightValue, /* ValueJoiner */
JoinWindows.of(5000),
Joined.with(
Serdes.String(), /* key */
Serdes.String(), /* left value */
Serdes.String()) /* right value */
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment