Search code examples
wso2complex-event-processingwso2-cep

WSO2 CEP event lifecycle


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


Solution

  • 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