0

I am looking for an EPL statement which fires an event each time the Id of the current message of my stream has raised more than one. Like (a+1 != b).

Something like this but I do not know the right syntax:

select * from pattern[a=test.SensorEvent(ids) -> b=test.SensorEvent(ids)(a+1!=b)];
Obsidian
  • 3,719
  • 8
  • 17
  • 30

1 Answers1

0

I recommend looking into match-recognize if you have frequent matches. Patterns are for less-frequent matches as they work off indexes on search criteria and maintaining indexes is an expense.

The expression is similar to temperature > a.temperature or temperature > (a.temperature + 1)

user3613754
  • 816
  • 1
  • 5
  • 5