In general this is not possible from MQTT. It might be possible
from a specific broker with its own specific facilities. But what
you are asking for is essentially what the broker does anyway. If
the size of the message you are sending is small, there would be
little difference in just sending the message vs inquiring as to
the existence of any subscribers.
Ian
On 08/18/2016 06:07 PM, Vignesh Aigal
wrote:
Hi,
I am looking at using mosquitto for some project. I wanted
to understand one thing. Is it possible to subscribe to some
topic which can give information about the lis of current
subscriptions in the broker? I am looking at a use case
wherein I would have a publisher publish a message for a topic
only if there are subscribers for that topic. I understand
that the publisher and subscriber should be independent, but
just wanted to check if this is possible
Thanks,
Vignesh Aigal
_______________________________________________
mosquitto-dev mailing list
mosquitto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/mosquitto-dev
--
Ian Craggs
icraggs@xxxxxxxxxx IBM United Kingdom
Paho Project Lead; Committer on Mosquitto