...
Create distributed CEP execution plans with the following properties
Warning title Warning Not following the below conventions will lead to unpredictable results! Info title Note In order to enable distributed deployments, prior to starting up the server, users need to enable hazelcast clustering by setting <CEP_HOME>/repository/conf/axis2/axis2.xml's clustering to true.
<clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
All execution plans across nodes has to have the same Execution Plan Name
Execution Plans has to have the following Backend Runtime Configuration
No Format Siddhi Configurations Snapshot time interval : 0 Distributed processing : true
These can be added to the configuration file as below.
Code Block language html/xml linenumbers true <executionPlan name="FraudAnalyzer" statistics="enable" trace="enable" xmlns="http://wso2.org/carbon/eventprocessor"> ... <siddhiConfiguration> <property name="siddhi.enable.distributed.processing">true</property> <property name="siddhi.persistence.snapshot.time.interval.minutes">0</property> </siddhiConfiguration> ... </bucket>executionPlan>
All execution plans should have identical query expressions (Queries has to use same stream names, same type of events and query expressions in all the execution plans have to be in the same order)
But the input topics need NOT to be the same, by using different input topics users can distribute load when publishing to CEP.
- Deploy the execution plans to CEP nodes.
...
WSO2 CEP persistence mode processing can be enabled at per bucket execution plan level where by only those identified buckets execution plans will persist bucket their states,
Follow below steps to enable persistence mode processing to a bucketfor an execution plan.
Create CEP bucket an execution plan with the following properties
Bucket Execution plan has to have the following Backend Siddhi Runtime Configuration
No Format BackendSiddhi Runtime ConfigurationConfigurations Persistence snapshotSnapshot time interval in minutes : 5 (Anyany positive long value) Enable distributed processing value as required, this is given in minutes) Distributed processing : true : false
These can be added to the configuration file as below.
Code Block language html/xml linenumbers true <bucket<executionPlan name="FraudAnalyzer" statistics="enable" trace="AllStocksAnalyzerenable" xmlns="http://wso2.org/carbon/cepeventprocessor"> ... <cep:engineProviderConfiguration engineProvider="SiddhiCEPRuntime"><siddhiConfiguration> <cep:property <property name="siddhi.persistenceenable.snapshot.time.interval.minutes">5</cep:distributed.processing">false</property> <cep:property<property name="siddhi.enable.distributed.processing">false</cep:persistence.snapshot.time.interval.minutes">5</property> </cep:engineProviderConfiguration>siddhiConfiguration> ... </bucket>executionPlan>
- In order to persist states at shout shut down use graceful shout shut down from the CEP server
The steps are as follows :
- Sign In. Enter your user name and password to log on to the Complex Event Processor Management Console.
- Click on "Shutdown/Restart Server" menu item under Manage section of the left panel
This will redirect to the Shutdown/Restart Server page. - Click on "Graceful Restart" and click "Yes" to conform Server restart when prompted.
- Sign In. Enter your user name and password to log on to the Complex Event Processor Management Console.
...