Overview of Samples
Required prerequisites for samples
Following applications are required for running the CEP samples in this documentation:
Application | Purpose | Version | Download Links |
---|---|---|---|
Apache Active MQ | The JMS samples are explained to be tried out using Active MQ. The ActiveMQ client libraries must be installed in the product's classpath before you can enable the JMS transport. | 5.5.0 or later | |
Apache Ant | To compile and run the product samples. | 1.7.0 or later | http://ant.apache.org |
Oracle Java SE Development Kit (JDK) | To launch the product and to run Apache Ant. | 1.6.24 or later / 1.7.* | http://java.sun.com/javase/downloads/index.jsp |
Understanding the samples
CEP samples explain different usecases of the product using sample clients (producers and consumers). The general flow of all samples is as follows:
- Each sample starts the CEP with a different configuration.
- After the CEP starts, the clients send Thrift, JMS, REST or POX messages to the CEP over transports such as HTTP/HTTPS, JMS with WS-Addressing, WS-Security, or WS-Reliable messaging.
- The CEP receives these messages, processes them, and passes them to sample consumers.
The following table summarizes the producer/consumer clients and the mapping types of each CEP sample. See Setting up CEP Samples for instructions to set up and run samples.
Sample No | Producer [Publish Topic] | Consumer [Subscription Topic] | Input Adapter Type | Event Builder Type | Event Formatter Type | Output Adapter Type | Comments |
---|---|---|---|---|---|---|---|
0001 | service-stats | wso2event | wso2event | wso2event | wso2event | wso2event | |
0002 | stock-quote [AllStockQuotes] | jms [BasicStockQuotes] | jms (activemq) | json | map | jms | |
purchase-info | log-service | jms (activemq) | map | xml | ws-event-local | ||
0004 | email (Refer to ReadMe.txt) | jms | text | json | jms | ||
0005 | pizza-shop | email (Refer to ReadMe.txt ) | ws-event-local | xml | text | ||
0006 | service-stats | wso2event | wso2event | wso2event | wso2event | wso2event | |
0101 | mediation-stats | wos2event | wso2event | wso2event | wso2event | wso2event | |
0102 | twitter-feed, stock-quote [AllStockQuotes] | log-service [PredictedStockQuotes] | jms, wso2event | json, wso2event | xml | ws-event-local |
|
0103 | flight-stats | jms Queue consumer | jms (activemq) | xml | text | jms | Add necessary active-mq related client jars & axiom jar |
0104 | login-info | wso2event | wso2event | wso2event | wso2event | wso2event | |
0105 | atm-transaction-stats | log-service | ws-event | xml | xml | ws-event | Need to run WSO2 MB in offset 1 (Need to create subscription for this topic to log service) |
0106 | build-failure-rest-api | wso2event (Through rest api) | wso2event | text | Follow the instruction in readme.txt to send events. | ||
0107 | mediation-stats | wos2event | wso2event | wso2event | wso2event | wso2event | Need to have 2 consumer test-servers in port 7611 & 7612 (To test Load-balancing) |
0108 | pizza-shop (pizzaPublisherClient) | wos2event | wso2event | wso2event | wso2event | wso2event |