I'm trying to find out how to implement the following logic having stream of events:
- First event appear in given time window(30s)
- Second event that is related to the first one(by some property) didn't appear in given time window
- Generate new error event
Currently I implemented the "opposite" implementation which was pretty easy:
stream.begin('first').where({conditions}).next('second').where({conditions}).within(Time.seconds(30))