0

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

Manoj Kalluri
  • 1,384
  • 2
  • 14
  • 27
  • Can you show us your code - how you implemented the Kafka adapter and the Esper processer? – Leon Nov 08 '18 at 09:25

1 Answers1

1

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

user650839
  • 2,594
  • 1
  • 13
  • 9
  • Thank you!, I figured out this a day back , what u answered is exactly right. earlier actually I tried something like `select count(*) from myEvents.win:time(1 min) having 1>count(*) ` which don't work - finally I came across the solution above mentioned . – Manoj Kalluri Sep 11 '17 at 16:09
  • In my actual code it is not events, I thought it could be easy for the community members to understand my question so I used that `events` . thanks for pointing it – Manoj Kalluri Sep 11 '17 at 16:12