MQTT subscriber

Create module

Open EMQX DashboardMQTT Subscriber - 图1 (opens new window), click the “Modules” tab on the left, and choose to add:

image-20200927213049265

Select the MQTT subscriber module:

MQTT Subscriber - 图3

Fill in the relevant parameters:

MQTT Subscriber - 图4

After clicking Add, the module is added:

MQTT Subscriber - 图5

WARING

If the MQTT server supports shared subscription, then we should use it. This is because all the emqx nodes in the cluster subscribe to the same topic, if the shared subscription is not used, each node will receive the same message, resulting in duplicate messages.