End-of-window outer join with KafkaStreams

后端 未结 3 1903
轻奢々
轻奢々 2021-01-03 09:05

I have a Kafka topic where I expect messages with two different key types: old and new. i.e. \"1-new\", \"1-old\", \"2-new\", \"

3条回答
  •  滥情空心
    2021-01-03 09:16

    If I understand your question correctly you only want to report id's as suspicious when there is an "old" without a corresponding "new" within the 2-minute window.

    If that's the case you'll want to use a left join :

    val leftJoined = oldStream.leftJoin(newStream,...).filter(condition where value expected from "new" stream is null);
    

    HTH

提交回复
热议问题