Skip to content

Using Siddhi Extensions

Madhawa Vidanapathirana edited this page Aug 23, 2017 · 3 revisions

Obtaining Siddhi Extensions

Compiled versions of Siddhi Extensions can be downloaded from WSO2 Releases Maven Repository. The sources are available at WSO2 Extensions GitHub Repository.

Alternatively, custom extensions can be written to suite users needs.

Loading Siddhi Extensions to Python Wrapper

All the required Siddhi extensions should be loaded prior to calling any methods in Siddhi CEP Library.

The above statement excludes method SiddhiLoader.addExtensionsPath() which is used to load extensions. Therefore, as the very first step, load all the extensions you wish to use in your Python Program.

The extensions are loaded by providing the path of the extension JAR file to SiddhiLoader.addExtensionsPath() as follows.

SiddhiLoader.addExtensionPath("path_to_extension_jar")

It is possible to include all the extension JARs in a directory by specifying the location of directory followed by /*.

SiddhiLoader.addExtensionPath("path_of_directory_with_extension_jars/*")

For loading most of the extensions, the above mentioned procedure is sufficient. However, for certain rare cases, it is required to manually configure the loaded extension with Siddhi Manager. In such cases, after loading the Siddhi Extension JAR as mentioned before, call SiddhiManager.setExtension("Extension Name", "Fully Qualified Type Name of Extension-Class") to configure the loaded extension with Siddhi Manager.

For more details and potential use cases of extensions, refer Extensions Tests for Siddhi 3.1 and Extensions Tests for Siddhi 4.x.