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.
Previous Apache ActiveMQ versions may not contain SLF4J related files in the client JAR. Therefore, if you get an error, add SLF4J related JAR file to
<CEP_HOME>/samples/lib/ directory of the samples.
Start the WSO2 CEP server with the sample configuration numbered 0002. For instructions, see Starting sample CEP configurations. This sample configuration does the following:
<CEP_HOME>/repository/conf/data-bridge/stream-definitions.xmlfile, which is used to create the stream definitions for the sample.
<CEP_HOME>/sample/artifacts/0002(by default, the Axis2 repo is
Open a new terminal, go to
<CEP_HOME>/samples/consumers/jms and run the following command:
It builds and runs the jms consumer.
Do not close this terminal. It is required to keep the server running and receiving events.
Open another terminal, go to
<CEP_HOME>/samples/producers/stock-quote and run ant -Devents=7 from there to build and run the jms producer.
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.
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.
Sample on using WSO2 MB as the JMS message broker