Enterprise Integration Zone is brought to you in partnership with:

Madhuka is Software Engineer and currently works on the Jaggery, UES, WSO2 Gadget Server team. He holds a B.Sc (Hons) degree in Information Technology from the Faculty of Information Madhuka is a DZone MVB and is not an employee of DZone and has posted 50 posts at DZone. You can read more from them at their website. View Full User Profile

WSO2 CEP with ActiveMQ JMS Broker

03.09.2013
| 2670 views |
  • submit to reddit
If you need simple a WSO2 CEP simple sample, try out this. This post explains how use WSO2 CEP and ActiveMQ JMS Broker to publish and subscribe events.

Prerequisite

install ActiveMQ JMS Broker.

Before Start CEP

1. Copy
activemq-all-xxx.jar

from the <ActiveMQ_HOME> directory to <CEP_HOME>/samples/lib directory.

2.Copy
activemq-core-xxx.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar

from <ActiveMQ_HOME>/lib to <CEP_HOME>/repository/components/lib directory.

3.Go to <CEP_HOME>/samples/cep-samples and enter "ant deploy-jms"

imageimage

image

This will copy the broker-manager-config.xml

4. Now start the WSO2 Complex Event Processor from wso2server.bat/sh

Starting JMS Subscriber

5. Start ActiveMQ JMS Broker
6. Enter "ant jmsSubscriber -Dtopic=PredictedStockQuotes" <CEP_HOME>/samples/cep-samples

image


Publishing Events
7. Go to <CEP_HOME>/samples/cep-samples and type "ant jmsAllStockQuotesPublisher"

image

8. You will be able observe the output events in the JMS subscriber console as shown bellow.

image

Published at DZone with permission of Madhuka Udantha, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)