Search code examples
mqttpahoandroid-open-accessory

How can I know, to which topic the arrived message belongs?


I am developing an App and I am using MQTT protocol supported by Paho library.

I am subscribing to 10 topics, and there will be a messgae(s) published for one at least one topic. now, when I get notified about the arrival of a new messae, how can i know to which topic it belongs?

Update:

pic1pic2


Solution

  • The object that you get when the message arrives should have a destination field which will contain the topic.