Introduction Message Queue for MQTT Demo project, including the use of various application scenarios, please refer to the documentation comments of the program source code for understanding.

Get multi-language Demo

scene Download address
Example for sending and receiving MQTT messages separately mqtt.demo.java
MQTT signature example mqtt.signature.mode.demo.java
MQTT Token example mqtt.token.mode.demo.java
MQTT SSL encryption example mqtt.ssl.demo.java
Example for sending messages through MQTT and subscribing to messages in RocketMQ mqtt.to.rocketmq.demo.java
Example of RocketMQ sending MQTT subscription messages rocketmq.to.mqtt.demo.java
MQTT-based sending of ordered messages: RocketMQ-based subscription to ordered messages mqtt.ordered.msg.demo.java
Example of asynchronous online /offline notification on an MQTT client mqtt.client.status.notice.demo.java
scene Download address
Example for sending and receiving MQTT messages separately mqtt.demo.python
MQTT signature example mqtt.signature.mode.demo.python
MQTT SSL encryption example mqtt.ssl.mode.demo.python
scene Download address
Example for sending and receiving MQTT messages separately mqtt.demo.php
MQTT signature examplee mqtt.signature.mode.demo.php
MQTT Token example mqtt.token.mode.demo.php
MQTT-based sending of ordered messages: RocketMQ-based subscription to ordered messages mqtt.ordered.msg.demo.php
scene Download address
Example for sending and receiving MQTT messages separately mqtt.demo.c
MQTT signature example mqtt.signature.mode.demo.c
MQTT SSL encryption example mqtt.ssl.demo.c
scene Download address
Example for sending and receiving MQTT messages separat mqtt.demo.net
MQTT signature example mqtt.signature.mode.demo.net
MQTT SSL encryption example mqtt.ssl.mode.demo.net
scene Download address
Example for sending and receiving MQTT messages separately mqtt.demo.javascript
MQTT signature exampl mqtt.signature.mode.demo.javascript
MQTT SSL encryption example mqtt.ssl.demo.javascript
WebSocket message sending and receiving example mqtt.websocket.demo.javascript
scene Download address
Example for sending and receiving MQTT messages separately mqtt.demo.ios
MQTT signature example mqtt.signature.mode.demo.ios
MQTT SSL encryption example mqtt.ssl.demo.ios

For the complete set of sample code, see mqtt-demo.

Decompress the package after the download is complete. The lmq-demo folder is added. Level-1 folders are categorized based on the development language. Perform debugging as needed.

Demo usage instructions

If used in combination Message Queue for MQTT and other backend message storage products, such as Message Queue for Apache RocketMQ to understand the message structure and property mapping. For more information, see Message structure mappings between Message Queue for MQTT and Message Queue for Apache RocketMQ.

Note The demo project integrity may vary depending on specific languages, which will be updated in the future. If some features do not have any Demo, download the corresponding SDKs for the corresponding languages for testing. For more information, see Java examples.

References

The sample code is for reference only. For more information about how to obtain the SDK in the relevant language, see Download the SDK.