WSO2 Complex Event Processor is succeeded by WSO2 Stream Processor. To view the latest documentation for WSO2 SP, see WSO2 Stream Processor Documentation.

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The Siddhi Stream Processor Extension allows events to be collected and expired with altering the by modifying the event format based on the given input parameters.

To implement a custom stream processor,  create follow the procedure below.

  1. Create a class

...

  1. extending org.wso2.siddhi.core.query.processor.stream.StreamProcessor

...

  1. .
  2. Create an appropriate .siddhiext extension mapping file

...

  1. .
  2. Compile the class

...

  1. .
  2. Build the jar containing

...

  1. the .class and the .siddhiext files.
  2. Add

...

  1. the jar to the Siddhi class path.

...

  1. If you need to run the extension on WSO2 CEP, add the jar to the <CEP_HOME>/repository/components/dropins directory.

For example, a Stream Processor Extension extension created with timeseries as the namespace "timeseries" and regress as the function name "regress" can be referred in the a query as follows:shown below. 

Code Block
languagesql
linenumberstrue
from baseballData#timeseries:regress(2, 10000, 0.95, salary, rbi, walks, strikeouts, errors)
select *
insert into regResults;

...