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.
Set up the prerequisites required for all samples.
Building the sample
- Two streams named
- An event receiver named
- An event publisher named
uniqueIpPublisherto log the received messages.
- An execution plan named
Executing the sample
<DAS_HOME>/samples/cep/producers/http/directory, and execute the following Ant command using another tab in the CLI.
ant -Durl= -Dsn=0113
The other optional parameters that can be used in the above command are defined in the
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.