how to trigger esper if there are no incoming events for a given period of time

177 Views Asked by At

I have esper processer configured to listen messages in kafka.

usually select * from events.win:time(2 min) will trigger all events in last 2 mins Now, I want to trigger a notification if there are no messages in kafka for last 2 minutes.

how should I deal with it, when I write something like select * from events(Ip='1.1.1.1').win:time(2 min) this will not have matching messages/events and esper is not triggering .

how should I trigger esper if events are absent in given time

Thanks in advance

1

There are 1 best solutions below

2
On BEST ANSWER

You could do this

select * from pattern [every (timer:interval(2 min) and not MyEvent)]

// tip: don't call your event "events", call it something useful and use uppercase