0
votes

I'm playing with the MQTT broker at 'broker.emqx.io' and have subscribed clients to the topic '/python/mqtt', which is the default topic in a Github repository containing an example client implementation in Python. My subscribing client is receiving messages published by my publishing client in the example code. In the time I've spent running the code while modifying it apparently no other client in the entire world has published a message to the topic. Is there something magical going on whereby subscribers in my local network receive only messages published from my local network? Or is there just no traffic on the topic?

2
Which GitHub project (so I can raise a pull request to fix that broken topic that shouldn't start with a leading /)? - hardillb
Subscribe to BCDS/# and you'll see the messages from our 24/7 MQTT lab at mqttlab.iotsim.io/readonly . - Gambit Support
@hardillb Sorry. I neglected to keep track of the source of what looked to me to be a generic example. In fact, I think it was this blog: emqx.io/blog/how-to-use-mqtt-in-python - Tom Russell

2 Answers

1
votes

The simplest answer is the most likely, there just isn't anybody else running that example code at the same time against the same broker.

0
votes

Disclaimer: I can't add comments :(, and this should be more a comment than a answer.

Yet the MQTT standard defines a very flexible set of rules for naming topics, there are some restrictions that arise by practical reasons.

The leading back-slash is accepted by topic filters but it does not provide any benefit, on the contrary, it introduces an unnecessary topic level which is, furthermore, empty. Maybe they introduced it in the topic for demonstrating something or for other reasons they had at that moment, like making people noticing it ;).

There are other characters that also have special meanings, like $, which is often used for naming system-defined topics that publish statistics or other related information.

Most broker documentations provide a short guideline for naming topics, like HiveMQ does.