com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_link3' is unknown.

Sample 0002 - Simple Pass-through with JMS

Introduction

This sample demonstrates how to filter incoming event attributes and add them to a topic using simple pass-through with JMS adapter. 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 0002. 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/0002 (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/jms and run the following command:

    ant topicConsumer -Dtopic=BasicStockQuotes (Since we are sending events from CEP to a topic called BasicStockQuotes)

    It builds and runs the jms consumer.

    Do not close this terminal. It is required to keep the server running and receiving events.

  2. Open another terminal, go to <CEP_HOME>/samples/producers/stock-quote and run ant from there to build and run the jms producer.

  3. In the terminal opened in step 2, see the jms producer sending sample stock quotes information to the CEP server. Given below is a sample of the sent events.

  4. In the terminal opened in step 1, see the output events received from the CEP.

    Shown below an example console output of the consumer, when sending events from the jms producer.  

     

com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'next_previous_links2' is unknown.