user2352052
user2352052

Reputation: 1

Esper - detect absence of a certain event

is it possible to detect the absence of a certain event type within a given time window without using any other event types in Esper?

Thanx ;)

Upvotes: 0

Views: 645

Answers (2)

xpa1492
xpa1492

Reputation: 1973

You can take a look at the solution patterns here for some ideas: http://www.espertech.com/esper/solution-patterns#absence-1

Here is an adapted example of detecting an absence of an event, after it has been fired once:

select * from pattern [every EventX -> (timer:interval(10 sec) and not EventX)];

This will fire only once, if after an EventX is received, no other EventX arrives within 10 seconds...

This example:

select * from pattern [every (timer:interval(10 sec) and not EventX)];

Will fire every 10 seconds if no EventX has been receive during that time (and keep firing like this forever).

Upvotes: 1

user3613754
user3613754

Reputation: 816

Outer joins are also a good way to detect the absence of an event.

Upvotes: 0

Related Questions