paho.mqtt.java icon indicating copy to clipboard operation
paho.mqtt.java copied to clipboard

Stack Overflow on v5 subscribe()

Open aaron-613 opened this issue 3 years ago • 3 comments

Hi there,

Just trying out the v5 client for the first time. Ran into a stack overflow bug almost immediately. It's on line 525 of MqttClient:

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

Thanks.

aaron-613 avatar Dec 04 '21 16:12 aaron-613

I think this caused because this function calls itself. And therefor gets in an infinite recursive loop. I worked around it, by using the subscribe function on line 528.

JanEbbinge avatar Dec 16 '21 21:12 JanEbbinge

Looks like a fix is already in pull request. https://github.com/eclipse/paho.mqtt.java/pull/899

JanEbbinge avatar Dec 16 '21 21:12 JanEbbinge

When will this bug going to be fixed? We are facing this issue and therefore can not use the paho mqtt v5 client.

shurkanTwo avatar Jun 01 '22 13:06 shurkanTwo