This can be done by modifying the configuration file.
EMQ v2.3.11, software architecture has been adjusted to integrate functions in the Emq_modules module,/data/loaded_plugins will load emq_modules by default.
We just need to change the configuration file emqx-rel-2.3.11/deps/emq_modules/etc/emq_modules.conf
# #--------------------------------------------------------------------# # Subscription module##------------------ --------------------------------------------------# # Enable Subscription module.#### Value:on | Offmodule.subscription = on # Subscribe The Topics automatically when client connected.module.subscription.1.topic =%c/w # # Qos of the subscription:0 | 1 | 2
Set the module.subscription to ON,
Setting the Module.subscription.1.topic to%c/w,%c is a wildcard character that automatically switches to ClientID. Note that it is%c, not $c.
EMQ---Client on-line automatic subscription topic