|
|
2 лет назад | |
|---|---|---|
| .. | ||
| etc | 2 лет назад | |
| include | 2 лет назад | |
| src | 2 лет назад | |
| test | 2 лет назад | |
| .gitignore | 2 лет назад | |
| README.md | 2 лет назад | |
| rebar.config | 2 лет назад | |
EMQX Schema Registry for managing various of schemas for decoding/encoding messages.
To use schema in rule engine, a schema name should be passed to the SQL functions that decode/encode data, like:
SELECT
schema_decode('sensor_notify', payload) as payload
FROM
"message.publish"
WHERE
topic = 't/1'
+---------------------------+
| |
Events/Msgs | | Events/Msgs
--------------------> EMQX |------------------>
| |
| |
+-------------|-------------+
|
HOOK |
|
+-------------v-------------+ +----------+
| | Data | |
| Rule Engine ------------- Backends |
| | | |
+------|-------------|------+ +----------+
|^ |^
Decode|| ||Encode
|| ||
+------v|------------v|-----+
| |
| Schema Registry |
| |
+---------------------------+
| |
Decode | [APIs] | Encode
| |
| | [Registry]
+------v--------------v------+
REGISTER SCHEMA | |
INSTANCE | | +--------+
-------------------> | | |
[Management APIs] | Schema Registry ------ Schema |
| | | |
| | +--------+
| |
+----------------------------+
/ | \
+---/---+ +---|----+ +---\---+
| | | | | |
[Decoders] | Avro | |ProtoBuf| |Others |
| | | | | |
+-------+ +--------+ +-------+