Rules are defined by JSON, below is an example.
The following 3 parameters are required for creating a rule.
Parameters
id
The identification of the rule. The rule name cannot be duplicated in the same Kuiper instance.
sql
The sql query to run for the rule.
options
The current options includes:
For detail about qos and checkpointInterval, please check state and fault tolerance.
The rule options can be defined globally in etc/kuiper.yaml under the rules section. The options defined in the rule json will override the global setting.
Sources
•
Kuiper provides embedded following 3 sources,
◦
MQTT source, see MQTT source stream for more detailed info.
◦
EdgeX source by default is shipped in docker images, but NOT included in single download binary files, you use make pkg_with_edgex command to build a binary package that supports EdgeX source. Please see EdgeX source stream for more datailed info.
◦
HTTP pull source, regularly pull the contents at user's specified interval time, see here for more detailed info.
•
See SQL for more info of Kuiper SQL.
•
sinks/actions
Currently, below kinds of sinks/actions are supported:
•
log: Send the result to log file.
•
mqtt: Send the result to an MQTT broker.
•
edgex: Send the result to EdgeX message bus.
•
rest: Send the result to a Rest HTTP server.
•
nop: Send the result to a nop operation.
Each action can define its own properties. There are several common properties: