This sample demonstrates how to receive incoming Map events adheres WSO2 Event format via jms transport using JMS Queue. Here we do not do any processing on the incoming event and to verify the messages we use log event publisher to log the received event.
Follow the steps below to set up the prerequisites before starting the configuration.
Start Apache ActiveMQ server.
This guide uses ActiveMQ versions 5.7.0 - 5.9.0. If you want to use a later version, for instructions on the necessary changes to the configuration steps, go to Apache ActiveMQ Documentation.
- Configure WSO2 CEP by adding relevant libraries to support JMS transport.
Configure sample client by adding relevant jars. See Setting up JMS for JMS sample clients.
Building the sample
Start the WSO2 CEP server with the sample configuration numbered 0021. For instructions, see Starting sample CEP configurations. This sample configuration does the following:
- Changes the default Axis2 repo from
- Creates a stream named
- Creates an event receiver named
- Creates an event publisher named
jmsLoggerto log the received messages.
Executing the sample
Wait until the CEP terminal prompts a message similar as follows.
Open another terminal, go to
and run one of the the following commands according to the type of event format to be published:
ant -DqueueName=queueMap -Dformat=csv -Dbroker=activemq -Dsn=0021
It builds the jms client and publishes the events at
<CEP_HOME>/samples/cep/artifacts/0021/queueMap.csvto the jms receiver endpoint.
You can see the events getting received by CEP by the logs in its console, for Map formatted events: