这里写描述
Array
(
[/sys/WG585OWAN20102200373/up] => 0
[/sys/WG585OWAN20102200364/up] => 1
[/sys/WG585OWAN20102200333/up] => 2
[/sys/WG585OWAN20102200399/up] => 3
[/sys/WG585OWAN20102200369/up] => 4
)
-------------网关加载完毕-------------
-> Send SUBSCRIBE package, topic:/sys/WG585OWAN20102200373/up,/sys/WG585OWAN20102200364/up,/sys/WG585OWAN20102200333/up,/sys/WG585OWAN20102200399/up,/sys/WG585OWAN20102200369/up message_id:1 properties:[]
-- Connection closed
-- Reconnect after 1 seconds
-- Tcp connection established
-> Send CONNECT package client_id:workerman-mqtt-client-604084921 username:admin password:admin888 clean_session:1 protocol_name:MQTT protocol_level:4
<- Recv CONNACK package, MQTT connect success
-> Send SUBSCRIBE(Resubscribe) package topics:/sys/WG585OWAN20102200373/up,/sys/WG585OWAN20102200364/up,/sys/WG585OWAN20102200333/up,/sys/WG585OWAN20102200399/up,/sys/WG585OWAN20102200369/up message_id:2
-- Connection closed
-- Reconnect after 1 seconds
-- Tcp connection established
-> Send CONNECT package client_id:workerman-mqtt-client-604084921 username:admin password:admin888 clean_session:1 protocol_name:MQTT protocol_level:4
<- Recv CONNACK package, MQTT connect success
-> Send SUBSCRIBE(Resubscribe) package topics:/sys/WG585OWAN20102200373/up,/sys/WG585OWAN20102200364/up,/sys/WG585OWAN20102200333/up,/sys/WG585OWAN20102200399/up,/sys/WG585OWAN20102200369/up message_id:3
-- Connection closed
-- Reconnect after 1 seconds
-- Tcp connection established
-> Send CONNECT package client_id:workerman-mqtt-client-604084921 username:admin password:admin888 clean_session:1 protocol_name:MQTT protocol_level:4
<- Recv CONNACK package, MQTT connect success
-> Send SUBSCRIBE(Resubscribe) package topics:/sys/WG585OWAN20102200373/up,/sys/WG585OWAN20102200364/up,/sys/WG585OWAN20102200333/up,/sys/WG585OWAN20102200399/up,/sys/WG585OWAN20102200369/up message_id:4
当数组是3个以内消息没有任何问题,超过三个就无法订阅了
订阅数组,数组元素超3个
Workerman version:4.1.5 PHP version:7.2.1
看手册,https://www.workerman.net/doc/workerman/components/workerman-mqtt.html#subscribe
key是topic,值是QoS,mqtt QoS 只有 0 1 2,没有3、4,你传3或4时服务端认为非法数据,所以服务端断开了