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 NameFeature
emqx_mod_delayedDelay Publish
emqx_mod_topic_metricsTopic Metrics
emqx_mod_subscriptionProxy Subscriptions
emqx_mod_acl_internalInternal ACL
emqx_mod_rewriteTopic Rewrite
emqx_mod_presenceClient 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:

  1. $ ./emqx_ctl modules load emqx_mod_delayed
  2. Module emqx_mod_delayed loaded successfully.
  1. $ curl -i --basic -u admin:public -X PUT "http://localhost:8081/api/v4/nodes/emqx@127.0.0.1/modules/emqx_mod_delayed/load"
  2. {"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

  1. {emqx_mod_rewrite, false}.

Start by default

  1. {emqx_mod_rewrite, true}.