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 set up an execution plan with output rate limiting functionality. It uses the following Siddhi query to output custom events with the last IP addresses received from the loginEvents stream for every 5 events. Custom events are emitted every 5 events. Custom events are events with custom mappings that do not adhere to the default event formats. For more information on event formats, see Event Formats

from loginEvents 
select ipAddress as ip 
output last every 5 events 
insert into uniqueIps;


Set up the prerequisites required for all samples.

Building the sample

Start the WSO2 DAS server with the sample configuration numbered 0113. For instructions, see Starting sample CEP configurations.
This sample configuration creates the following.
  • Two streams named and org.wso2.sample.out.unique.login:1.0.0.
  • An event receiver named loginInfoReceiver.
  • An event publisher named uniqueIpPublisher to log the received messages.
  • An execution plan named UniqueLoginExecutionPlan.

Executing the sample

Navigate to the <DAS_HOME>/samples/cep/producers/http/ directory, and execute the following Ant command using another tab in the CLI.
ant -Durl=http://localhost:9763/endpoints/loginInfoReceiver  -Dsn=0113

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

This builds the HTTP client and publishes the events defined in the <DAS_HOME>/samples/cep/artifacts/0113/loginInfoReceiver.txt file to the loginInfoReceiver endpoint. The details of the events that are sent are logged as shown below.

events being sent by the HTTP client

The output events received by the DAS server are logged as shown below.

events received by the CEP server

  • No labels