- I have use case where there are events comming from a topic pattern (
myTopic-cusId
). I have set up a kafka stream listener which listen to the incoming events from these topics. - What I have done so far is build a stream from the topic and created a Ktable which keeps the running sum and averages of various customer metrics.
- Now I want to filter the stream based on the values and condition of Ktable but I want the filtering to be happening periodically (but I want to wait for this filter to happen at the starting of building the stream (to make sure that Ktable has some useful info to check the conditions)) (
Lets says wait for first 30 secs to start the filtering from the first event and after that query the state store every 20 secs until all the events are processed.
)
Is there any way I could achieve this or any design pattern that would solve this use case?