MQTT subscription to multiple topics?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Can we subscribe to multiple topics in the client?

We need this in order to remote control a client. Using messages under only one topic is not a solution for me.

The README document in the SDK 4.1 under libraries/protocols/MQTT states the restriction:

"- Subscribe method  currently supports subscribing one filter at a time."

Does this restriction still exist?

If yes, what does "at a time" mean exactly?

Thanks for supporting!

0 Likes
1 Solution
Anonymous
Not applicable

Hello klaus2

Currently our MQTT libraries will not support subscribing multiple topics in single subscribe message. You need to subscribe the topics separately.

View solution in original post

3 Replies
Anonymous
Not applicable

Hello klaus2

Currently our MQTT libraries will not support subscribing multiple topics in single subscribe message. You need to subscribe the topics separately.

Anonymous
Not applicable

Thanks Rash,

Does this mean that we can call the function wiced_mqtt_subscribe() for each of say 4 topics and the wait in parallel on these topics?

0 Likes
Anonymous
Not applicable

Yes, Logically this should be the way. Please try and let me know if you need any assistance.