With Siddhi 1.x we could do:
siddhiManager.defineStream("define stream firstStream ( id int, name string)"); siddhiManager.defineStream("define stream secondStream ( id int, name string)"); siddhiManager.defineStream("define stream thirdStream ( id int, name string)");
siddhiManager.addQuery("from every F = firstStream " + " -> S = secondStream [F.id == S.id] within 1 min" + "insert into midStream F.id as id, F.name as name, S.id as secondId ;"); siddhiManager.addQuery("from every M = midStream " + " -> T = thirdStream [M.id == T.id] within i min " + "insert into outputStream M.id, M.name, T.id"); InputHandler firstEventHandler = siddhiManager.getInputHandler("firstStream"); InputHandler secondEventHandler = siddhiManager.getInputHandler("secondStream"); InputHandler thirdEventHandler = siddhiManager.getInputHandler("secondStream");
Then we could send events to appropriate handlers. I want to do same thing with version 3.0.4
With Siddhi 3.0.4 entire definition is defined as
String executionPlan1 = "define stream.. " + "@info(name = 'query') " + "from ..";
ExecutionPlanRuntime executionPlanRuntime1 = siddhiManager.createExecutionPlanRuntime(executionPlan1);
So I tried creating multiple ExecutionPlanRuntime & each having its own stream definition, but it didn't work. Do we need to also define midStream?
- Can anyone kindly suggest correct way to do add multiple queries to SiddhiManager so as to achive what we could do as I had mentioned in 1st point.?
Thanks & Regards