Siddhi supports custom codes within queries. You can implement Windows, Transformers, OutputAttributeProcessors, Functions (Conditions and Expressions) in a pluggable manner using the current implementation.
Note
These are subjected to be changed in a future release.
Use of Namespaces and Functions in Siddhi Extensions
Siddhi allows extensions to have namespaces and function names, enabling users to easily identify the extensions' behaviors when writing queries.
To add namespace and function names to the extension, use the following Java annotation in the extension class.
@SiddhiExtension(namespace = "testExt", function = "unique") public class UniqueWindowProcessor extends WindowProcessor { ... }
You can refer to the above class in the query as follows:
from StockExchangeStream[price >= 20]#window.testExt:unique(symbol) select symbol, price insert into StockQuote
The following sections explains how we can create different types of Siddhi Extensions,