WSO2 CEP事件生命周期 [英] WSO2 CEP event lifecycle
问题描述
是否有任何文档/文章解释WSO2 CEP中的事件生命周期? 我不太了解如何从事件流中丢弃事件.
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.
谢谢你, 雨果·卡拉多(Hugo Calado)
Thank you, Hugo Calado
推荐答案
事件将立即被丢弃.基本流程是流将接收来自和接收者的事件,并且它将立即将事件推送到发布者而不进行存储.如果要在特定时间段内收集事件,则可以在Siddhi执行计划[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].
在随后的Siddhi查询中,它收集事件10分钟,然后通过计算平均流将其插入AvgTempStream.在这种情况下,事件将在内存中存储10分钟.
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
这篇关于WSO2 CEP事件生命周期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!