Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent Limit on the number of subscribed topics, callback ignored #219

Open
joihn opened this issue Dec 10, 2022 · 1 comment
Open

Silent Limit on the number of subscribed topics, callback ignored #219

joihn opened this issue Dec 10, 2022 · 1 comment

Comments

@joihn
Copy link

joihn commented Dec 10, 2022

Env:
Esp8266, communication via TLS

Symptom:
When too many subscriber are registered, the last few one will never execute their callback.

reproducing
Subscribe to multiple topics (17 in my case) with this syntax

Adafruit_MQTT_Subscribe trigg1 = Adafruit_MQTT_Subscribe(&mqtt, "triggTopic1", MQTT_QOS_1);
trigg1.setCallback(foo);
mqtt.subscribe(&trigg1);
Adafruit_MQTT_Subscribe trigg2 = Adafruit_MQTT_Subscribe(&mqtt, "triggTopic2", MQTT_QOS_1);
trigg1.setCallback(bar);
mqtt.subscribe(&trigg2);

etc...
The last few subsriber will get ignored, silently (!!!!!) (they will never execute their callback, despite a successfull compilation, thus very confusing to debug )
There seems to be a silent hidden limit on the max. number of subscribed topics.

@joihn
Copy link
Author

joihn commented Dec 10, 2022

there is indeed a limit
https://github.com/adafruit/Adafruit_MQTT_Library/blob/master/Adafruit_MQTT.h#L126

Maybe a verbose failure when exceeding it would be a good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant