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 18 Next »

Introduction

This sample demonstrates how to filter incoming event attributes and add them to another topic using simple pass-through with JMS adaptor and WS-Event-Local adaptor. Because we do not use any execution plan here, there is no Siddhi query.

Prerequisites

  1. See Prerequisites in CEP Samples Setup page.
  2. Copy the ActiveMQ JMS related JARs referred in JMS Transport to <CEP_HOME>/repository/components/lib directory.
  3. Copy the following JARs from ActiveMQ distribution directory to <CEP_HOME>/samples/lib directory.
    • <ActiveMQ_HOME>/activemq-all-5.7.0.jar

    • <ActiveMQ_HOME>/lib/ geronimo-jms_1.1_spec-1.1.1.jar

    Start the ActiveMQ server before the CEP server starts.

Building the Sample 

Start the WSO2 CEP server with the sample configuration numbered 0003. For instructions, see Starting sample CEP configurations. This sample configuration does the following:

  • Creates <CEP_HOME>/repository/conf/stream-manager-config.xml file, which is used to create the stream definitions for the sample.
  • Points the default Axis2 repo to <CEP_HOME>/sample/artifacts/0003 (by default, the Axis2 repo is <CEP_HOME>/repository/deployment/server).

Executing the Sample

  1. Open a new terminal, go to <CEP_HOME>/samples/consumers/log-service and run the following command:

    ant -DsampleNo=0003

    It builds the axis2 sample log service and deploys it in the axis2 repository that is relevant to the sample. After proper deployment, the Web service can receive messages sent from the CEP server.

  2. Note the logs in the CEP server when LogService.aar is deploying. For example,

  3. Create PurchaseOrders topic in the local broker and subscribe LogService on that topic.

    It enables the LogService to receive output events from the CEP server under the PurchaseOrders topic.
  4. Log in to the CEP management console and click the Add menu under Topics menu.
  5. Provide the topic name as PurchaseOrders (the output topic) and click Add Topic. It adds the topic to the server and you will be directed to the Topic Browser page.
  6. The Topic Browser page opens with the topic created before. Click the Subscribe link associated with it.
  7. The Subscribe page opens. Create subscription with following details:

    You are now subscribed to the topic and ready to send events to the CEP. 

  8. Open another terminal, go to <CEP_HOME>/samples/producers/purchase-info and run ant from there.

    It builds and runs the jms producer, which sends purchase data to the CEP server.

  9. From this terminal, view the details of the events sent. For example,

  10. Go to the console output of the CEP server and note the events received after processing. For example,

  • No labels