eclipse / paho.mqtt.java

Eclipse Paho Java MQTT client library. Paho is an Eclipse IoT project.
https://eclipse.org/paho
Other
2.12k stars 883 forks source link

StackOverflow in MQTTv5 when subscribing with a topicfilter, qos and a IMqttMessageListener #863

Open Questlog opened 3 years ago

Questlog commented 3 years ago

https://github.com/eclipse/paho.mqtt.java/blob/develop/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttClient.java#L523-L525

The subscribe method is calling itself.

public IMqttToken subscribe(String[] topicFilters, int[] qos, IMqttMessageListener[] messageListeners)
            throws MqttException {
    return this.subscribe(topicFilters, qos, messageListeners);
}
fengyuanhui commented 3 years ago

When will it be fixed? Please repair it ASAP !

a983132370 commented 3 years ago

It works .....

https://github.com/eclipse/paho.mqtt.java/blob/240f82f8c99d4b2301cf44c4d3b57f234be5d409/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttClient.java#L528

Questlog commented 3 years ago

It works .....

https://github.com/eclipse/paho.mqtt.java/blob/240f82f8c99d4b2301cf44c4d3b57f234be5d409/org.eclipse.paho.mqttv5.client/src/main/java/org/eclipse/paho/mqttv5/client/MqttClient.java#L528

Yeah, use that one. The other two subscribe methods would be more convenient though.