emqx/apps/emqx_schema_registry
Thales Macedo Garitezi 6f00df6452 fix(schema registry api): validate schema name when creating
Fixes https://emqx.atlassian.net/browse/EMQX-10958
2024-06-27 09:26:41 -03:00
..
etc refactor(schema_registry): refactor schema registry app and modules 2023-07-12 09:24:15 -03:00
include feat(schema_registry): add JSON schema 2024-02-29 21:03:52 +01:00
priv refactor(schema_registry): refactor schema registry app and modules 2023-07-12 09:24:15 -03:00
src fix(schema registry api): validate schema name when creating 2024-06-27 09:26:41 -03:00
test fix(schema registry api): validate schema name when creating 2024-06-27 09:26:41 -03:00
BSL.txt chore: update BSL license change date 2024-01-29 16:47:31 +01:00
README.md refactor(schema_registry): refactor schema registry app and modules 2023-07-12 09:24:15 -03:00
rebar.config chore: upgrade to jesse 1.8.0 for draft-06 as default version 2024-03-19 14:47:11 +01: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.

Documentation

Contributing

Please see our contributing.md.

License

EMQ Business Source License 1.1, refer to LICENSE.