Let say we have a object Model where we have a few fileds and one of them is "price".
I want to calculate AVG of that pirce on every event in 20s window and then filter those events that has "price - calculatedAvg > 5".
Input data are like data KStream<String, Model> inputData
and output data have the same type.
When I use "window" and aggregate/calculate price my output is long/double and I do not know how I can get my events from Window object to filter events.
How I can do something like this?