Siddhi Application
Provides introduction to the concept of Siddhi Application.
Siddhi App provides an isolated execution environment for processing the execution logic. It can be deployed and processed independently of other SiddhiApps in the system. Siddhi Apps can use inMemory
sources and sinks to communicate between each other.
@app:name('Temperature-Processor')
@app:description('App for processing temperature data.')
@source(type='inMemory', topic='SensorDetail')
define stream TemperatureStream (
sensorId string, temperature double);
@sink(type='inMemory', topic='Temperature')
define stream TemperatureOnlyStream (temperature double);
@info(name = 'Simple-selection')
from TemperatureStream
select temperature
insert into TemperatureOnlyStream;
|
Name of the Siddhi Application |
|
Optional description for Siddhi Application |
|
|
|
|
|
Input
When an event ['aq-14'
, 35.4
] is pushed via the SensorDetail
topic of the inMemory
transport from another Siddhi App, the event will be consumed and mapped to the TemperatureStream
stream.
Output
After processing, the event [35.4
] arriving at TemperatureOnlyStream
will be emitted via Temperature
topic of the inMemory
transport to other subscribed Siddhi Apps.