emqx/lib-ee/emqx_ee_schema_registry
Serge Tupchii e4d09d4ad4 feat: implement configuration and user data export/import CLI
Closes: EMQX-9203
2023-06-09 14:11:47 +03:00
..
etc feat: implement schema registry for 5.0 (avro) 2023-04-06 16:28:45 -03:00
include feat(schema_registry): add support for protobuf schemas 2023-04-17 13:04:54 -03:00
src feat: implement configuration and user data export/import CLI 2023-06-09 14:11:47 +03:00
test feat: implement configuration and user data export/import CLI 2023-06-09 14:11:47 +03:00
.gitignore feat: implement schema registry for 5.0 (avro) 2023-04-06 16:28:45 -03:00
README.md feat: implement schema registry for 5.0 (avro) 2023-04-11 14:50:45 -03:00
rebar.config feat(schema_registry): add support for protobuf schemas 2023-04-17 13:04:54 -03:00

README.md

EMQX Schema Registry

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'

Using schema registry with rule engine

                      +---------------------------+
                     |                           |
 Events/Msgs         |                           |   Events/Msgs
 -------------------->           EMQX            |------------------>
                     |                           |
                     |                           |
                     +-------------|-------------+
                                   |
                             HOOK  |
                                   |
                     +-------------v-------------+           +----------+
                     |                           |   Data    |          |
                     |        Rule Engine        ------------- Backends |
                     |                           |           |          |
                     +------|-------------|------+           +----------+
                            |^            |^
                      Decode||            ||Encode
                            ||            ||
                     +------v|------------v|-----+
                     |                           |
                     |      Schema Registry      |
                     |                           |
                     +---------------------------+

Architecture

                              |              |
                       Decode |    [APIs]    | Encode
                              |              |
                              |              |           [Registry]
                       +------v--------------v------+
    REGISTER SCHEMA    |                            |
       INSTANCE        |                            |    +--------+
    ------------------->                            |    |        |
[Management APIs]      |       Schema Registry      ------ Schema |
                       |                            |    |        |
                       |                            |    +--------+
                       |                            |
                       +----------------------------+
                            /        |        \
                       +---/---+ +---|----+ +---\---+
                       |       | |        | |       |
      [Decoders]       | Avro  | |ProtoBuf| |Others |
                       |       | |        | |       |
                       +-------+ +--------+ +-------+

  • Register schema instance: adds a new instance of a schema of a certain type. For example, when the user may have several Avro or Protobuf schemas that they wish to use with different data flows.