...
- Install the WSO2 Complex Event Processor, but do not start the server, Refer to the Installation and Deployment for instructions.
Copy paste activemq-all-xxx.jar from the <ActiveMQ_HOME> directory to <CEP_HOME>/samples/lib directory.
Copy paste activemq-core-xxx.jar and geronimo-j2ee-management_1.1_spec-1.0.1.jar from <ActiveMQ_HOME>/lib to <CEP_HOME>/repository/components/lib directory.
- In a command prompt, switch to the sample directory: <CEP_HOME>/samples/cep-samples
For example, in Linux: cd <CEP_HOME>/samples/cep-samples - From there, type ant deploy-persistence,
This will copy the broker-manager-config.xml to <CEP_HOME>/repository/conf directory and the bucket configuration to <CEP_HOME>/repository/deployment/server/cepbuckets directory. - Start ActiveMQ JMS Broker. Refer Installation Prerequisites for instructions to run ActiveMQ JMS Broker.
- Now start the WSO2 Complex Event Processor. Refer to the Running Installing the Product for instructions.
Starting JMS subscriber
The steps are as follows :
- Start ActiveMQ JMS Broker. Refer Installation Prerequisites for instructions to run ActiveMQ JMS Broker.
- In a new command prompt, switch to the sample directory: <CEP_HOME>/samples/cep-samples
For example, in Linux: cd <CEP_HOME>/samples/cep-samples - From there, type ant jmsSubscriber -Dtopic=RetailSummary, this will subscribe to the RetailSummary topic of the ActiveMQ Broker receiving the output events of CEP.
...
Note | ||
---|---|---|
| ||
Observe how the PurchaseOrders, QuantitySold and the RevenueEarned fields increases according to the input events. Note, sometimes some of the above entries might not get printed, due to batch processing, but you will always get the most updated value. |
...
Gracefully restarting CEP server
The steps are as follows :
...