-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathconfig-rule.yaml
58 lines (54 loc) · 1.14 KB
/
config-rule.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# data integration
# connectors used by sources or sinks
connectors:
- name: test-conn
type: amqp
options:
url: amqp://guest:guest@localhost:5672/
# data sources
sources:
- name: test-src1
type: embed-mqtt
options:
topic: $iothub/things/#
qos: 1
- name: test-src2
type: embed-mqtt
options:
topic: $iothub/user/things/+/property
qos: 1
# data sinks
sinks:
- name: test-sink
type: amqp
connector: test-conn
options:
exchange: dev-tio
routingKey:
# Sources --> Process(filter and transform) --> Sinks
# Only json messages are supported
#
# processing message using gojq https://github.com/itchyny/gojq
#
# Message format :
# {
# "thingId": "thignId",
# "topic": "message/mqtt/topic"
# "payload": {
# "a": "a value of message payload"
# }
# }
# rules:
# - name: test-rule
# sources:
# - test-src1
# - test-src2
# process:
# - type: filter
# name: keep-bigger-than-10
# jq: ".payload.data.a > 10"
# - type: transform
# name: to-field-x
# jq: "{ X: .payload.data.a }"
# sinks:
# - test-sink