This sample demonstrates how to publish map and XML events via JMS transport. You consume the published events in CEP using a JMS client which is subscribed to WSO2 Message Broker. This sample does not do any processing on the outgoing event.
Follow the steps below to set up the prerequisites before starting the configuration.
Before you configure the WSO2 DAS, start WSO2 MB (version 3.0.0 or later).
Configure WSO2 DAS by adding relevant libraries to support JMS transport.
Configure a sample client by adding relevant jars. See setting up JMS for JMS sample clients.
<DAS_HOME>/repository/conf/jndi.propertiesfile and register a connection factory named
TopicConnectionFactoryby entering the following in the
register some connection factoriessection. Then add the topics to be sent to the Qpid broker.
Building the sample
Start the WSO2 DAS server with the sample configuration numbered
0061 with a port offset because WSO2 MB is running in the default port. For instructions, see Starting sample CEP configurations and append -
to the command as follows.
./wso2cep-samples.sh -sn 0061 -DportOffset=1 -Dqpid.dest_syntax=BURL
- Changes the default Axis2 repo from
- Creates a stream with ID
- Creates event publishers named
- Hot deploys the
event.csvfile along with the
Executing the sample
- Start WSO2 DAS with sample 0061 configurations. For more information, see Starting sample CEP configurations.
Issue the following commands from the
<DAS_HOME>/samples/cep/consumers/jmsdirectory using a separate terminal for each command. The commands should be issued according to the type of the topic name of the messages to be consumed.
ant -Dbroker=mb -DtopicName=topicMap
ant -Dbroker=mb -DtopicName=topicXML
It subscribes to the WSO2 Message Broker under the mentioned topic name.
event.csvfile deployed using the Event Simulator. This will send an event flow through the stream to the JMS publishers. For detailed instructions to play a file, see Sending Multiple Events Using a CSV File.
Events published by WSO2 DAS are logged in the JMS consumer console as shown below.Y
for Map formatted events:
for XML formatted events: