what is recommended way to use siddhiappruntime

29 views
Skip to first unread message

Amol Dawkhar

unread,
Aug 25, 2022, 2:16:25 AM8/25/22
to siddhi-dev
We have event based pipeline in place,  so each event will be passed (evaluated) through set of rules. consider 100 rules. 

what is recommended to create a siddhi runtime? should we place 100 rules in one siddhi runtime or should create a siddhi runtime for each rule? 
 
e.g as 

With one SiddhiRuntime rule as
 //Siddhi Application
String siddhiApp =
"define stream windowsProcessStream (uniqueId string, customerId string, eventAction string, process_Name string); " +
"@info(name = 'rule1') " +
"from windowsProcessStream[(eventAction == 'RUNNING' and process_Name =='vbc.exe')]" +
"select customerId as customerId,eventAction as eventAction, uniqueId as uniqueId " +
"insert into outputStream; " +
"@info(name ='rule2') "+
"from windowsProcessStream[(eventAction == 'RUNNING1')]" +
"select customerId as customerId,eventAction as eventAction, uniqueId as uniqueId " +
"insert into outputStream;";

siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(siddhiApp);




Reply all
Reply to author
Forward
0 new messages