izzyacademy commented on a change in pull request #10740: URL: https://github.com/apache/kafka/pull/10740#discussion_r637016692
########## File path: streams/src/main/java/org/apache/kafka/streams/kstream/JoinWindows.java ########## @@ -168,6 +172,50 @@ public JoinWindows grace(final Duration afterWindowEnd) throws IllegalArgumentEx return new JoinWindows(beforeMs, afterMs, afterWindowEndMs); } + + /** + * Specifies that records of the same key are joinable if their timestamps are within {@code timeDifference}, + * i.e., the timestamp of a record from the secondary stream is max {@code timeDifference} earlier or later than + * the timestamp of the record from the primary stream. + * + * @param timeDifference join window interval + * @throws IllegalArgumentException if {@code timeDifference} is negative or can't be represented as {@code long milliseconds} + * @since 3.0 + */ + public static JoinWindows ofTimeDifferenceWithNoGrace(final Duration timeDifference) { + return ofTimeDifferenceAndGrace(timeDifference, ofMillis(DEFAULT_GRACE_PERIOD_MS)); Review comment: @ableegoldman this makes sense. I dont really like Magic numbers so I can create something like NO_GRACE_PERIOD (with a value of 0L) instead. But I appreciate this feedback. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org