云消息队列 MQTT 版支持多语言的消息收发。本文提供单独使用云消息队列 MQTT 版收发消息以及与云消息队列 RocketMQ 版结合使用时需使用的代码示例的链接。

单独使用云消息队列 MQTT 版收发消息

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/MQ4IoTSendMessageToMQ4IoTUseSignatureMode.java
Chttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-c-demo/src/c/mqttDemo.c
Pythonhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-python-demo/MQTTSendMessage2MQTT.py
.NEThttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-DoNet-demo/MQTTDemo.cs
JavaScripthttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-js-demo/lmqdemo.html
iOS https://github.com/AliwareMQ/lmq-demo/tree/master/lmq-ios-demo/MQTTChatDemo
PHPhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-php-demo/MQTTSendMessageToMQTT.php

云消息队列 MQTT 版发送云消息队列 RocketMQ 版接收

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/MQ4IoTSendMessageToRocketMQ.java

云消息队列 RocketMQ 版发送云消息队列 MQTT 版接收

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/RocketMQSendMessageToMQ4IoT.java

云消息队列 MQTT 版客户端使用签名模式

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/MQ4IoTSendMessageToMQ4IoTUseSignatureMode.java
Chttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-c-demo/src/c/mqttDemo.c
Pythonhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-python-demo/MQTTSendMessage2MQTT.py
.NEThttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-DoNet-demo/MQTTDemo.cs
JavaScripthttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-js-demo/lmqdemo.html
iOS https://github.com/AliwareMQ/lmq-demo/tree/master/lmq-ios-demo/MQTTChatDemo
PHPhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-php-demo/MQTTConnectUseSignatureMode.php

云消息队列 MQTT 版客户端使用Token模式

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/MQ4IoTSendMessageToMQ4IoTUseTokenMode.java
PHPhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-php-demo/MQTTConnectUseTokenMode.php

云消息队列 MQTT 版客户端使用SSL加密

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/MQ4IoTSendMessageToMQ4IoTUseSignatureMode.java
Chttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-c-demo/src/c/mqttDemo.c
Pythonhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-python-demo/MQTTSendMessage2MQTT.py
.NEThttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-DoNet-demo/MQTTDemo.cs
JavaScripthttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-js-demo/lmqdemo.html
iOS https://github.com/AliwareMQ/lmq-demo/tree/master/lmq-ios-demo/MQTTChatDemo

云消息队列 MQTT 版客户端发送顺序消息到云消息队列 RocketMQ 版

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/MQ4IoTSendOrderMessageToRocketMQ.java
PHPhttps://github.com/AliwareMQ/lmq-demo/blob/master/lmq-php-demo/MQTTSendOrderMessage.php

查询云消息队列 MQTT 版客户端在线数量

语言链接
Java https://github.com/AliwareMQ/lmq-demo/blob/master/lmq-java-demo/src/main/java/com/aliyun/openservices/lmq/example/demo/QueryOnlineClientNumDemo.java