tree: 7094b5187657f845ba397ace6de83357c6cd10e6 [path history] [tgz]
  1. src/
  2. pom.xml
  3. README.md
example/mqtt-customize/README.md

Customized IoTDB-MQTT-Broker Example

Function

The example is to show how to customize your MQTT message format

Usage

  • Define your implementation which implements PayloadFormatter.java
  • modify the file in src/main/resources/META-INF/services/org.apache.iotdb.db.mqtt.PayloadFormatter: clean the file and put your implementation class name into the file
  • compile your implementation as a jar file

Then, in your server:

  • put the jar into your server's lib folder
  • Update configuration to enable MQTT service. (enable_mqtt_service=true in iotdb-engine.properties)
  • et the value of mqtt_payload_formatter in conf/iotdb-engine.properties as the value of getName() in your implementation
  • Launch the IoTDB server.
  • Now IoTDB will use your implementation to parse the MQTT message.