This sample demonstrates how to receive incoming map events that adhere to the WSO2 Event format via the JMS transport. This sample does not process the incoming events. A log event publisher is used to log the received events, and to verify the messages.
Follow the steps below to set up the prerequisites before starting the configuration.
Set up the general prerequisites required for all samples.
Navigate to the
<ACTIVEMQ_HOME>/bin/directory and execute the following command to start the Apache ActiveMQ server.
This guide uses ActiveMQ versions 5.7.0 - 5.9.0. If you want to use a later version, follow the instructions in the Apache ActiveMQ Documentation.
Configure WSO2 DAS by adding the relevant libraries to support JMS transport.
Configure the sample client by adding the relevant jars. For more information, see setting up JMS for JMS sample clients.
Building the sample
Start the WSO2 DAS server with the sample configuration numbered 0009. For instructions, see Starting sample CEP configurations.
This sample configuration does the following:
- Changes the default Axis2 repo from
- Creates a stream with the ID
- Creates an event receiver named
- Creates an event publisher named
jmsLoggerto log the received messages.
Executing the sample
Wait until the DAS terminal prompts a message similar to the following.
Open another terminal and navigate to the
Then run the following command:
ant -DtopicName=topicMap -Dformat=map -Dbroker=activemq -Dsn=0009
It builds the JMS client and publishes the events in the
<DAS_HOME>/samples/cep/artifacts/0009/topicMap.csvfile to the ActiveMQ brocker which then will be recieved via JMS receiver endpoint.
The events received by WSO2 DAS are logged in the console as shown below.