This documentation is for WSO2 CEP 3.0.0. View the home page of the latest release.

Unknown macro: {next_previous_link3}
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Introduction

This example is related to simple pass-through with JMS adaptor. Here there is no any execution plan used (hence there is no any Siddhi query). Here we are just filtering some incoming event attributes, adding to a another topic and passing to it. Here we are using  

Prerequisites

Refer to Prerequisites section in CEP Samples Setup page.

  • Need to add necessary ActiveMQ jms related jars to the <CEP_HOME>/repository/components/lib directory of the CEP server (Please refer this ) 

Building the Sample 

  1. Start the WSO2 CEP server with the sample number as ./wso2cep-samples.sh -sn 0003  (or on Windows, wso2cep-samples.bat -sn 0003). This will start up the server with the configuration files required for this samples.

    Here when executing the sample with above command. There are some operations occurred in the backend. There is file called "stream-manager-config.xml" copied to the <CEP_HOME>/repository/conf from the artifacts directory of the sample. This file will be used in the server startup to create the stream definitions to run the sample.

    Then, default Axis2 repo will be pointed to the directory <CEP_HOME>/sample/artifacts/0001 (by default Axis2 repo is <CEP_HOME>/repository/deployment/server). There will be limited functionality in sample server startup mode, then don't proceed much tasks in the server when it is start-up in the sample mode.

Executing the Sample

  1. Open another terminal and switch to <CEP_HOME>/samples/consumers/log-service and run the below command. This will build the sample axis2 sample log service and deploy in the axis2 repository that is relevant to the specified sample. After proper deployment, the web service will be able to receive messages sent from the CEP server. Below you can see the logs in CEP server when LogService.aar is deploying.

    ant -DsampleNo=0003

  2. Then, We need to Configure the LogService in order to receive the output events emitted by the CEP server under the PurchaseOrders topic. Here we will be creating PurchaseOrders topic in the local broker and subscribe  LogService on that topic.
  3. Click on "Add" menu item under "Topics" Menu in Manage section of the left panel. Then Specify the topic name in the topic input text box, in this case topic name is : "PurchaseOrders" (the output topic) and click on 'Add Topic' button. This will add the topic to the server and you will be directed to the Topic Browser page.
  4. Once you click on the topic in topic browser page you will be able see four links as in the bellow image. Click in the subscribe link and you will be directed to Subscribe page.
  5. Create subscription with following details. Once you are done click the Subscribe button.
  6. Now subscription to the specific topic is done. Now we can send events to CEP. 

  7. From another terminal switch to <CEP_HOME>/samples/producers/purchase-info/ and run ant from there. This will build and run the jms producer which will send some purchase information to the CEP server. From this terminal, you will be able to view the details of the events sent. Below is the sample screen shot when sending events.

  8. Once the step 3 is done successfully, you will be able to see the output events received from the CEP via the terminal opened in step 2.

  9. Below is the console output in the CEP server when events are received after processing. 

  • No labels