Let’s briefly introduce the deployment and use of HIVEMQ Extension for TDEngine.

Tdengine and HIVEMQ deployment methods

TDengine

Install the latest TDEngine Server. See the official document: https://www.taosdata.com/cn/getting-started/.

HiveMQ

Installation enterprise Edition (need to apply for the trial License) or Community Edition (HiveMQ Community Edition, https://github.com/hivemq/hivemq-community-edition). See the official document: https://www.hivemq.com/docs/hivemq/4.4/user-guide/install-hivemq.html

The compilation and deployment of the Hivemq Tdengine plug-in

  1. git clone https://github.com/taosdata/TDengine
  2. cd TDengine && git submodule update --init --recursive
  3. cd src/connector/hivemq-tdengine-extension && mvn clean && mvn package
  4. Unzip the packaged package such as hivemq-tdengine-extension-{version}-distribution.zip into the hivemq directory under the extensions folder. If HIVEMQ is already running, it is necessary to stop the HIVEMQ background service first, otherwise HIVEMQ will prohibit the operation of the plug-in, and manual deletion of the DISABLED file is required to enable the plug-in to work.
  5. Modify the tdengine.xml configuration file in the plug-in package to the actual database information used.
  6. There is no need to manually create the library and table, the plug-in will start automatically create the library and table

demo

Run HivMQ

<HiveMQ>/bin/run.sh

Send an MQTT message

Use the popular MQTT software mosquitto to send MQTT messages for the test demonstration:

mosquitto_pub -t test-m "hello world"

Verify that the verification record is written to TDengine by logging in the TAOS client: