Let's say I have 2 kafka streams (kafka-streams-scala library, version 2.2.0):
val builder: StreamsBuilder = new StreamsBuilder
val stream1: KStream[String, GenericRecord] = builder.stream[String, GenericRecord]("topic1")
val stream2: KStream[String, GenericRecord] = builder.stream[String, GenericRecord]("topic2")
and their join:
val stream3: KStream[String, MyClass] = flights.join(schedules)((r1, r2) => MyClass(r1.get("f1"), r2.get("f2")), JoinWindows.of(Duration.ofSeconds(30))
What is the equivalent of WHERE clause available in KSQL? (see late_orders stream) for streams API? Is it a good idea to just use stream3.filter? Will this approach have the same efficiency as stream created by KSQL?