Query available topics on broker

3,142 views
Skip to first unread message

Florian Pirchner

unread,
Jul 17, 2013, 7:05:54 AM7/17/13
to mq...@googlegroups.com
Hi,

i am looking for a way to query all available topics on the broker. Every clients registers with a unique topic. If i would know all the topics available i could send messages to a single client using its unique topic.

So far i could not find a feature.

Thanks a lot,
Florian

Carl Hörberg

unread,
Jul 17, 2013, 8:10:40 AM7/17/13
to mq...@googlegroups.com
It's not a feature of the protocol, but maybe the server you use has such a (non-standard) feature.
> --
> --
> To learn more about MQTT please visit http://mqtt.org
>
> To post to this group, send email to mq...@googlegroups.com (mailto:mq...@googlegroups.com)
> To unsubscribe from this group, send email to
> mqtt+uns...@googlegroups.com (mailto:mqtt+uns...@googlegroups.com)
>
> For more options, visit this group at
> http://groups.google.com/group/mqtt
>
> ---
> You received this message because you are subscribed to the Google Groups "MQ Telemetry Transport" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com (mailto:mqtt+uns...@googlegroups.com).
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



Andy Piper

unread,
Jul 17, 2013, 8:11:41 AM7/17/13
to mq...@googlegroups.com
Hi Florian, thanks for joining the group.


On Wednesday, 17 July 2013 12:05:54 UTC+1, Florian Pirchner wrote:

i am looking for a way to query all available topics on the broker. Every clients registers with a unique topic. If i would know all the topics available i could send messages to a single client using its unique topic.

So far i could not find a feature.


That feature is not part of the MQTT spec and would have to be something provided by a broker as some kind of extension. 

Nicholas Humfrey has a MQTT-HTTP bridge app (https://github.com/njh/mqtt-http-bridge) which does list out the topics which have *retained publications* on a broker (you can see an example at http://eclipse.mqttbridge.com for the m2m.eclipse.org mosquitto broker), but it does it by subscribing to the wildcard # topic and then keeping a record of everything returned, and it will not work with ephemeral topics / topics without retained publications on them. Note that there's an open issue https://github.com/njh/mqtt-http-bridge/issues/2 which talks about the fact that currently, not all MQTT brokers behave in the same manner - RabbitMQ, Apollo, moquette and others will not work with that bridge app and this method of querying topics.

Andy

Florian Pirchner

unread,
Jul 17, 2013, 8:13:25 AM7/17/13
to mq...@googlegroups.com
Hi Andy,

thanks a lot. I will checkout.

Best Florian
Reply all
Reply to author
Forward
Message has been deleted
0 new messages