This sample demonstrates how to receive incoming custom map events via JMS transport. Custom events are events with custom mappings that does not adhere to the default event formats. For more information on event formats, see Event Formats. This sample does not do any processing on the incoming event. The 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 prerequisites required for all samples.
<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, 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 0010. For instructions, see Starting sample CEP configurations. This sample configuration does the following:
- Changes the default Axis2 repo from
- Creates a stream with id org.wso2.event.sensor.stream:1.0.0.
- Create and event receiver with name jmsReceiver with custom mapping.
- Create and event publisher to log the received messages with name jmsLogger.
Executing the sample
Wait until the CEP terminal prompts a message similar as follows.
Open another terminal, go to
ant -DtopicName=topicMap -Dformat=map -Dbroker=activemq -Dsn=0010
It builds the jms client and publishes the events at
<CEP_HOME>/samples/cep/artifacts/0010/topicMap.csvto the jms receiver endpoint.
You can see the events getting received by CEP by the logs in its console