Reputation: 428
As a MQTT client I want to know how can I get subscriptions(TOPICS):
I use Paho library and java as a client, with connecting with setCleanSession(false) so the client subscriptions(TOPIC) keeps in MQTT broker after disconnecting, if the topic subscription didn't emits some data , I didn't know that subscription is alive.
so I want to get all topic subscriptions of my MQTT client and if some topic didn't emits data for 10 minutes , unsubscribe that topic.
Upvotes: 8
Views: 5278
Reputation: 59608
You can not.
There is no way to query the broker for what topics the client has subscribed to in the protocol and in fact most MQTT client libraries don't even keep a list of subscribed topics for the current session.
Upvotes: 7