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 custom Map and JSON 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. You consume the published events in DAS using a JMS client that is subscribed to the Qpid broker.


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

  1. Install JMS-Qpid Broker and JMS-Qpid Client.

  2. Configure WSO2 DAS by adding relevant libraries to support JMS transport.

  3. Configure a sample client by adding relevant jars. See setting up JMS for JMS sample clients.

  4. 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 Qpid broker.


    connectionfactory.TopicConnectionFactory=amqp: //admin:[email protected]/default?brokerlist='tcp://localhost:5672'
    topic.topicMap = topicMap
    topic.topicJSON = topicJSON
  5. Start Qpid Broker with ./qpid-server start command by navigating to <QPID-BROKER_HOME>/bin

Building the sample 

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

This sample configuration does the following:

  • Changes the default Axis2 repo from  <DAS_HOME>/repository/deployment/server to <DAS_HOME>/sample/cep/artifacts/0060.
  • Creates a stream with ID
  • Creates event publishers named jmsPublisherMap and jmsPublisherText.
  • Hot deploys the event.csv file along with the event configuration xml.

Executing the sample

  1. Start WSO2 DAS with sample 0060 configurations. For more information, see Starting sample CEP configurations.
  2. Open another terminal and navigate to the <DAS_HOME>/samples/cep/consumers/jms directory.

    Run one of the following commands according to the type of the topic name of the messages to be consumed.

    ant -Dbroker=qpid -DtopicName=topicMap
    ant -Dbroker=qpid -DtopicName=topicJSON

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

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

  4. The events that are published by WSO2 DAS are loggeds in the JMS consumer console as follows.

    Map formatted events: 

    Text formatted events:

  • No labels