Topic: Subscribe To Several Topics
Hi Forum,
Is it possible to subscribe to several topics ?
Any example will be appreciated.
Thank you.
You are not logged in. Please login or register.
Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.
ReferenceswolfSSL - Embedded SSL Library → wolfMQTT → Subscribe To Several Topics
Hi Forum,
Is it possible to subscribe to several topics ?
Any example will be appreciated.
Thank you.
Hi rlev,
Yes, when using the MqttClient_Subscribe API to subscribe, you can pass as many topics as you'd like in the array MqttSubscribe->topics as long as you set topic_count correctly.
Here are a couple of examples that subscribe to a single topic, to expand them you'd just iterate over each topic and set their parameters accordingly:
https://github.com/wolfSSL/wolfMQTT/blo … ent.c#L383
https://github.com/wolfSSL/wolfMQTT/blo … ple.c#L399
Thanks,
Kareem
wolfSSL - Embedded SSL Library → wolfMQTT → Subscribe To Several Topics
Powered by PunBB, supported by Informer Technologies, Inc.
Generated in 0.019 seconds (91% PHP - 9% DB) with 11 queries