This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch rel/1.0
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/rel/1.0 by this push:
new c22a4862d4 Fix mqtt docs (#8859)
c22a4862d4 is described below
commit c22a4862d4b6884d0811469dc6d523f4e54014ce
Author: 马子坤 <[email protected]>
AuthorDate: Thu Jan 12 18:25:20 2023 +0800
Fix mqtt docs (#8859)
---
docs/UserGuide/API/Programming-MQTT.md | 4 ++--
docs/zh/UserGuide/API/Programming-MQTT.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/UserGuide/API/Programming-MQTT.md
b/docs/UserGuide/API/Programming-MQTT.md
index 0f1c83df1c..db3b1eb776 100644
--- a/docs/UserGuide/API/Programming-MQTT.md
+++ b/docs/UserGuide/API/Programming-MQTT.md
@@ -115,7 +115,7 @@ Steps:
<version>${project.version}</version>
</dependency>
```
-* Define your implementation which implements
`org.apache.iotdb.db.mqtt.PayloadFormatter.java`
+* Define your implementation which implements
`org.apache.iotdb.db.protocol.mqtt.PayloadFormatter`
e.g.,
```java
@@ -162,7 +162,7 @@ public class CustomizedJsonPayloadFormatter implements
PayloadFormatter {
}
}
```
-* modify the file in
`src/main/resources/META-INF/services/org.apache.iotdb.db.mqtt.PayloadFormatter`:
+* modify the file in
`src/main/resources/META-INF/services/org.apache.iotdb.db.protocol.mqtt.PayloadFormatter`:
clean the file and put your implementation class name into the file.
In this example, the content is:
`org.apache.iotdb.mqtt.server.CustomizedJsonPayloadFormatter`
* compile your implementation as a jar file: `mvn package -DskipTests`
diff --git a/docs/zh/UserGuide/API/Programming-MQTT.md
b/docs/zh/UserGuide/API/Programming-MQTT.md
index 57037ae75a..97d018966f 100644
--- a/docs/zh/UserGuide/API/Programming-MQTT.md
+++ b/docs/zh/UserGuide/API/Programming-MQTT.md
@@ -115,7 +115,7 @@ connection.disconnect();
<version>${project.version}</version>
</dependency>
```
-* 创建一个实现类,实现接口 `org.apache.iotdb.db.mqtt.PayloadFormatter.java`
+* 创建一个实现类,实现接口 `org.apache.iotdb.db.protocol.mqtt.PayloadFormatter`
```java
package org.apache.iotdb.mqtt.server;
@@ -161,7 +161,7 @@ public class CustomizedJsonPayloadFormatter implements
PayloadFormatter {
}
}
```
-* 修改项目中的
`src/main/resources/META-INF/services/org.apache.iotdb.db.mqtt.PayloadFormatter`
文件:
+* 修改项目中的
`src/main/resources/META-INF/services/org.apache.iotdb.db.protocol.mqtt.PayloadFormatter`
文件:
将示例中的文件内容清除,并将刚才的实现类的全名(包名.类名)写入文件中。注意,这个文件中只有一行。
在本例中,文件内容为: `org.apache.iotdb.mqtt.server.CustomizedJsonPayloadFormatter`
* 编译项目生成一个 jar 包: `mvn package -DskipTests`