Hi everyone, I need to implement following functionality. There is a kafka topic where "forward" events are coming and in the same topic there are "cancel" events. For each "forward" event I need to wait 1 minute for possible "cancel" event. I can uniquely match both events. If "cancel" event comes within this minute I need to delete "forward" event, otherwise pass "forward" event further in another kafka topic. "Cancel" events older than 1 minute could be ignored.
I was thinking to implement ProcessFunction with putting "forward" events in state with timer. If "cancel" event is coming I will delete "forward" event from state. My question: Is there more simple way to implement the same logic, possibly with CEP ? Thanks, Maxim.