Internal Modules

Internal Modules

EMQX provides features such as topic rewrit and proxy subscriptions in the form of internal modules, allowing users to start and stop modules at any time to start and stop corresponding features. The internal modules currently support the following features:

Module Name Feature
emqx_mod_delayed Delay Publish
emqx_mod_topic_metrics Topic Metrics
emqx_mod_subscription Proxy Subscriptions
emqx_mod_acl_internal Internal ACL
emqx_mod_rewrite Topic Rewrite
emqx_mod_presence Client Online and Offline Events

EMQX provides Command Line Interface and HTTP API for internal modules, users can easily pass these interfaces to start and stop modules, for example:

$ ./emqx_ctl modules load emqx_mod_delayed
Module emqx_mod_delayed loaded successfully.
``` ```
$ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/modules/emqx_mod_delayed/load"

{"code":0}

Of course, users can also complete these operations on the Dashboard, including viewing module status, which is also more commonly used.

By default, EMQX will start the two modules emqx_mod_acl_internal and emqx_mod_presence, that is, the internal ACL and client online and offline notification features are enabled by default. Users can modify the loaded_modules file in the EMQX data directory to change the default startup modules.

Does not start by default

{emqx_mod_rewrite, false}.

Start by default

{emqx_mod_rewrite, true}.