解决上一条,正因为有上一条,结合MqttConnectOptions的setCleanSession方法的描述(见下面的说明),将setCleanSession设置为true解决 — 客户端解决 /** <ul><li>Sets whether the client and server should remember state across restarts and reconnects.</li> <li><ul></li> <li><li>If set to false both the client and server will maintain state across</li> <li>restarts of the client, the server and the connection. As state is maintained:</li> <li><ul></li> <li><li>Message delivery will be reliable meeting</li> <li>the specified QOS even if the client, server or connection are restarted.</li> <li><li> The server will treat a subscription as durable.</li> <li></ul></li> <li><lI>If set to true the client and server will not maintain state across</li> <li>restarts of the client, the server or the connection. This means</li> <li><ul></li> <li><li>Message delivery to the specified QOS cannot be maintained if the</li> <li>client, server or connection are restarted</li> <li><lI>The server will treat a subscription as non-durable</li> <li></ul> */ 状态会被保留,常驻。若会连接泄露,则会导致服务端有同一个topic多份的监听实例, 注意。。。。这里我猜测的。。。我觉得后端的mqtt部分,对多份监听只回调了第一份。而我们新的监听实例在后面。。。故,这就接受不到回调。自然就出现了后端有发送,客户端没有接收到的结果。