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. This has the behavior of emitting a custom event per every 5 events. 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 .
Set up the prerequisites required for all samples.
Building the sample
- Two streams with the IDs
- An event receiver named
- An event publisher named
uniqueIpPublisherto log the received messages.
- An execution plan named
Executing the sample
<CEP_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
<CEP_HOME>/samples/cep/artifacts/0113/loginInfoReceiver.txt file to the
loginInfoReceiver endpoint. You view the details of the events that are sent as shown below.