Java 订阅主题时报错

Java连接mqqt后,订阅主题时,报错:
MqttException (128)
at org.eclipse.paho.client.mqttv3.MqttClient.subscribe(MqttClient.java:466)
at org.eclipse.paho.client.mqttv3.MqttClient.subscribe(MqttClient.java:429)
at org.eclipse.paho.client.mqttv3.MqttClient.subscribe(MqttClient.java:422)
at com.chinawinddata.transfer.MqttOneWayTlsSample.main(MqttOneWayTlsSample.java:82)

从你提供的内容,发现不了什么,建议你先在你的客户端 Debug 下

debug了,走到client.subscribe(TOPIC, QoS);这行代码报错