The latest version for DAS is WSO2 Data Analytics Server 3.1.0. View documentation for the latest release.
WSO2 Data Analytics Server is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

All docs This doc
Skip to end of metadata
Go to start of metadata


This sample demonstrates how to publish Map and Text events via JMS transport. You consume the published events in WSO2 DAS using a JMS client which is subscribed to ActiveMQ broker.


Follow the steps below to set up the prerequisites before starting the configuration.

  1. Install Apache ActiveMQ JMS event adapter. 

    This guide uses ActiveMQ versions 5.7.0. If you want to use a later version, for instructions on the necessary changes to the configuration steps, go to Apache ActiveMQ Documentation.
  2. Issue the following command from the <ACTIVEMQ_HOME>/bin directory to start ActiveMQ.
    ./activemq console 
  3. Configure WSO2 DAS by adding relevant libraries to support JMS transport.

  4. Configure the sample client by adding relevant jars. For more information, see setting up JMS for JMS sample clients.

  5. Open the <DAS_HOME>/repository/conf/ file and register a connection factory named TopicConnectionFactory by entering the following in the register some connection factories section. And add the topics to be sent to the ActiveMQ broker

    connectionfactory.TopicConnectionFactory=amqp: //admin:[email protected]/test?brokerlist='tcp://localhost:5672'
    topic.topicMap = topicMap
    topic.topicText = topicText

Building the sample 

Start the WSO2 DAS server with the sample configuration numbered 0059. For instructions, see Starting sample CEP configurations.

This sample configuration creates the following:

  • A stream with the ID
  • Two event publishers named jmsPublisherMap and jmsPublisherText.
  • Loads the events stored in the  <DAS_HOME>/samples/cep/artifacts/0059/eventsimulatorfiles/events.csv  file to the Event Simulator.

Executing the sample

  1. Open another terminal and navigate to the <DAS_HOME>/samples/cep/consumers/jms directory.

    and run one of the  the following commands according to the type of topic name of the messages suppose to consume

    ant -Dbroker=activemq -DtopicName=topicMap
    ant -Dbroker=activemq -DtopicName=topicText

    It subscribes to the ActiveMQ broker under the mentioned topic name.

  2. Play the event.csv file deployed using the Event Simulator. This sends an event flow through the stream to the JMS publisher.

    The events that are published by DAS are logged in the JMS consumer console as follows.

    Map formatted events: 

    for Text formatted events:

  • No labels