Skip to content

Siddhi Execution Extension - Env

The siddhi-execution-env extension is an extension to Siddhi that provides the capability to read environment properties inside Siddhi stream definitions and use it inside queries. Functions of the env extension are as follows..

Find some useful links below:

Latest API Docs

Latest API Docs is 2.0.0.

How to use

Using the extension in WSO2 Stream Processor

  • You can use this extension in the latest WSO2 Stream Processor that is a part of WSO2 Analytics offering, with editor, debugger and simulation support.

  • This extension is shipped by default with WSO2 Stream Processor, if you wish to use an alternative version of this extension you can replace the component jar that can be found in the <STREAM_PROCESSOR_HOME>/lib directory.

Using the extension as a java library

  • This extension can be added as a maven dependency along with other Siddhi dependencies to your project.

Jenkins Build Status

Branch Build Status
master Build Status


  • getEnvironmentProperty (Function)

    This function returns the Java environment property that corresponds with the key provided

  • getOriginIPFromXForwarded (Function)

    This function returns the public origin IP from the given X-Forwarded header.

  • getSystemProperty (Function)

    This function returns the system property referred to via the system property key.

  • getUserAgentProperty (Function)

    This function returns the value that corresponds with a specified property name of a specified user agent

  • getYAMLProperty (Function)

    This function returns the YAML property requested or the default values specified if such avariable is not specified in the 'deployment.yaml'.

  • resourceIdentifier (Stream Processor)

    The resource identifier stream processor is an extension to register a resource name with a reference in a static map and serve a static resources count for a specific resource name.

  • resourceBatch (Window)

    This extension is a resource batch (tumbling) window that holds a number of events based on the resource count inferred from the 'env:resourceIdentifier' extension, and with a specific attribute as the grouping key. The window is updated each time a batch of events arrive with a matching value for the grouping key, and where the number of events is equal to the resource count.

How to Contribute

Contact us


  • We are committed to ensuring support for this extension in production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.

  • For more details and to take advantage of this unique opportunity contact us via