simps / mqtt

🕹 MQTT Protocol Analysis and Coroutine Client for PHP. Support for 3.1, 3.1.1 and 5.0 versions of the MQTT protocol.

Home Page:https://mqtt.simps.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

使用阿里云MQTT微消息队列发送消息时报错

250121244 opened this issue · comments

场景:
点对点模式推送消息.

错误提示如下:
PHP Notice: Uninitialized string offset: 0 in /var/www/hhd_api/vendor/simps/mqtt/src/Packet/UnPackV5.php on line 369

Notice: Uninitialized string offset: 0 in /var/www/hhd_api/vendor/simps/mqtt/src/Packet/UnPackV5.php on line 369
array(4) {
["type"]=>
int(5)
["message_id"]=>
int(1)
["code"]=>
int(128)
["message"]=>
string(17) "Unspecified error"
}

从配置文件来看, 应该是还不支持吧. 目前是只支持自建MQTT服务器的模式吗

commented

支持MQTT标准协议,没测试阿里云的兼容性,可以给个复现代码我看看

阿里云的是MQTT 5.0协议?

commented

我用阿里云发布订阅测试了下,这个需要找下阿里云,Publish Ack返回的就是这个,但是又算成功了,订阅端还能收到publish

image

commented

使用3.1.1版本吧。

image