apache kafka – Start Timer on Event and trigger another event after timer in flink, Java

I want to know whether there is a timer in Flink and how I would go about implementing it in this scenario. Currently I am receiving data which contains geolocation, speed etc. from vehicles. For each of the data items I do processing and create events such as speeding events, geolocation entering and exiting and so forth. For one of the processing which I want to do is to start a timer once I create a geofence enter event and then instantly trigger a function to create another event after a set amount of time has elapsed. This is needed because it might be that the vehicle enters a geofence but I don’t get another data item in that time and then I want to create a EXCESS_STOP event. Is it possible in Flink to have a timer and trigger an event on the timer’s end without having received another data item on my Kafka source. And if so, what is it and is there anywhere I can get information on how to implement it.

Read more here: Source link