0

Is there any document/article explaining the event lifecycle in WSO2 CEP? I dont quite understand how the events are discarded from the event streams.

Thank you, Hugo Calado

Community
  • 1
  • 1
  • Isn't this useful? https://docs.wso2.com/display/CEP310/Getting+Started+with+CEP – Chathuranga Chandrasekara Feb 08 '16 at 10:44
  • 1
    I already read this article and implemented a few examples. However i cant understand what is the criteria of WSO2 CEP to mark a event as disposable. The event's cant live in memory forever, otherwise we will have out of memory errors. – Hugo Calado Feb 08 '16 at 11:45

1 Answers1

1

Events will be discarded immediately. Basic flow is stream will receive events from and receivers and it will immediately push events to publisher without storing. If you want to collect event for certain time periods you can use somwthing like time windows in Siddhi Execution Plans [1].

In following Siddhi query it collects events for 10 minutes and insert into AvgTempStream by calculating average stream. In that case events will be stored for 10 minutes in memory.

from TempStream#window.time(10 min)
select avg(temp) as avgTemp, roomNo, deviceID
insert all events into AvgTempStream;

[1] https://docs.wso2.com/display/CEP400/SiddhiQL+Guide+3.0#SiddhiQLGuide3.0-Window

Tharik Kanaka
  • 2,490
  • 6
  • 31
  • 54