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


Follow the procedure below to complete the prerequisites needed to execute this sample.

  1. Set up the prerequisites required for all samples

  2. Configure WSO2 DAS by adding relevant jars to support Kafka transport.
  3. Configure sample client by adding relevant jars. See setting up Kafka for Kafka sample clients.
  4. Start the Apache ZooKeeper server with the following command: bin/ config/ The logs shown in the screenshot below are displayed. For more information, see Apache Kafka documentation
    Apache ZooKeeper server start up logs
  5. Start the Kafka server with the following command.  
    bin/ config/  
    The following logs are displayed.
    Kafka server startup logs

Building the sample 

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

This sample configuration creates the following.

  • An event stream with the ID
  • An event receiver named kafkaReceiver to fetch events from the configured receiver email address.
  • An event publisher named loggerEventPublisher to log the received messages.

Executing the sample 

Navigate to the <DAS_HOME>/samples/cep/producers/kafka/ directory, and execute the following Ant command using another tab in the CLI.
ant -Durl=localhost:9092 -Dtopic=sensordata -Dsn=0018

The other optional parameters that can be used in the above command are defined in the  <DAS_HOME>/samples/cep/producers/kafka/build.xml file.

This builds the Kafka client and publishes the JSON events in the  <DAS_HOME>/samples/cep/artifacts/0018/sensordata.txt  file to the kafkaReceiver endpoint. You can view the details of the events that are sent as shown below.

events produced by the CEP producer

The JSON events received by the DAS server are logged in the CLI as shown below.

output logs of the events received by WSO2 CEP

  • No labels