emqx-extension-java-sdk

The emqx_extension_hook extremly enhance the extensibility for EMQ X. It allow using an others programming language to mount the hooks intead of erlang.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования
Группа

Группа

io.emqx
Идентификатор

Идентификатор

emqx-extension-java-sdk
Последняя версия

Последняя версия

1.0.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

emqx-extension-java-sdk
The emqx_extension_hook extremly enhance the extensibility for EMQ X. It allow using an others programming language to mount the hooks intead of erlang.
Ссылка на сайт

Ссылка на сайт

https://github.com/emqx/emqx-extension-java-sdk
Система контроля версий

Система контроля версий

https://github.com/emqx/emqx-extension-hook

Скачать emqx-extension-java-sdk

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/io.emqx/emqx-extension-java-sdk/ -->
<dependency>
    <groupId>io.emqx</groupId>
    <artifactId>emqx-extension-java-sdk</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.emqx/emqx-extension-java-sdk/
implementation 'io.emqx:emqx-extension-java-sdk:1.0.0'
// https://jarcasting.com/artifacts/io.emqx/emqx-extension-java-sdk/
implementation ("io.emqx:emqx-extension-java-sdk:1.0.0")
'io.emqx:emqx-extension-java-sdk:jar:1.0.0'
<dependency org="io.emqx" name="emqx-extension-java-sdk" rev="1.0.0">
  <artifact name="emqx-extension-java-sdk" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.emqx', module='emqx-extension-java-sdk', version='1.0.0')
)
libraryDependencies += "io.emqx" % "emqx-extension-java-sdk" % "1.0.0"
[io.emqx/emqx-extension-java-sdk "1.0.0"]

Зависимости

Библиотека не имеет зависимостей. Это самодостаточное приложение, которое не зависит ни от каких других библиотек.

Модули Проекта

Данный проект не имеет модулей.

emqx_extension_hook

The emqx_extension_hook extremly enhance the extensibility for EMQ X. It allow using an others programming language to mount the hooks intead of erlang.

Feature

  • Support python and java.
  • Support all hooks of emqx.
  • Allows you to use the return value to extend emqx behavior.

We temporarily no plans to support other languages. Plaease open a issue if you have to use other programming languages.

Architecture

 EMQ X                                      Third-party Runtimes
+========================+                 +====================+
|    Extension           |                 |                    |
|   +----------------+   |     Hooks       |  Python scripts /  |
|   |    Drivers     | ------------------> |  Java Classes   /  |
|   +----------------+   |     (pipe)      |  Others ...        |
|                        |                 |                    |
+========================+                 +====================+

Drivers

Python

Requirements:

  • It requires the emqx hosted machine has Python3 Runtimes (not support python2)
  • The python3 executable commands in your shell

Examples:

See test/scripts/main.py

Java

Requirements:

  • It requires the emqx hosted machine has Java 8+ Runtimes
  • An executable commands in your shell, i,g: java

Examples:

See test/scripts/Main.java

Configurations

Name Data Type Options Default Description
drivers Enum python3
java
python3 Drivers type
.path String - data/extension The codes/library search path
.call_timeout Duration - 5s Function call timeout
.pool_size Integer - 8 The pool size for the driver
.init_module String - main The module name for initial call

SDK

See sdk/README.md

Known Issues or TODOs

Configurable Log System

  • use stderr to print logs to the emqx console instead of stdout. An alternative is to print the logs to a file.
  • The Java driver can not redirect the stderr stream to erlang vm on Windows platform.

Reference

io.emqx

Scalable Enterprise MQTT Broker

The Scalable and Reliable Real-time MQTT 5.0 Message Broker for IoT in 5G Era

Версии библиотеки

Версия
1.0.0