0
在SiddhiQL中,如何插入多个具有相同条件的流?WSO2 CEP - 插入多个流
当我有两个相关的事件(event1和event2)并且想要 在streamA中插入event1; 在streamB中插入event2; 在streamC中插入abstractEvent。
我必须写三个Siddhi查询吗?
谢谢。
在SiddhiQL中,如何插入多个具有相同条件的流?WSO2 CEP - 插入多个流
当我有两个相关的事件(event1和event2)并且想要 在streamA中插入event1; 在streamB中插入event2; 在streamC中插入abstractEvent。
我必须写三个Siddhi查询吗?
谢谢。
是的,你需要在同一个执行计划中写入多个Siddhi查询来将事件插入到多个流中。您为每个流选择事件的逻辑可以使用过滤器完成。在以下情况下,我通过过滤器将奇怪的meta_id事件插入到stream1中,甚至插入到stream2中。
@Plan:name('ExecutionPlan')
@Import('test:1.0.0')
define stream test (meta_id int, meta_name string);
from test[meta_id % 2 == 0]
select *
insert into stream1;
from test[meta_id % 2 == 1]
select *
insert into stream2;
我有关于WS02 CEP的另一个问题,你知道答案:http://stackoverflow.com/questions/35267646/ws02-cep-event-lifecycle。 –