Thales Macedo Garitezi cd8bf2725a Merge pull request #13453 from thalesmg/20240711-r57-mt-fixes 1 年之前
..
etc 541d03a0ba refactor(schema_registry): refactor schema registry app and modules 2 年之前
include b7e5ea2941 feat(schema_registry): add JSON schema 2 年之前
priv 541d03a0ba refactor(schema_registry): refactor schema registry app and modules 2 年之前
src cd8bf2725a Merge pull request #13453 from thalesmg/20240711-r57-mt-fixes 1 年之前
test cd8bf2725a Merge pull request #13453 from thalesmg/20240711-r57-mt-fixes 1 年之前
BSL.txt 82403167c2 chore: update BSL license change date 2 年之前
README.md 541d03a0ba refactor(schema_registry): refactor schema registry app and modules 2 年之前
mix.exs afb65817c4 ci(mix): refactor to avoid conflicts 1 年之前
rebar.config b8505ebd54 chore: upgrade to jesse 1.8.0 for draft-06 as default version 2 年之前

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.

Documentation

Contributing

Please see our contributing.md.

License

EMQ Business Source License 1.1, refer to LICENSE.