Topic starts with a /
Closed this issue · 4 comments
Hi,
While testing the App, I had trouble to publish messages to a topic. I use the mosquito broker on my raspberry pi 4. Here I subscribed the topic „/test/topic“ and when I publish a message on the raspberry it was correctly shown in the app. Then I tried to publish a message in the app to the same topic but it was never shown on the raspberry. I tried to subscribe the topic „test/topic“ and then the messages were shown.
I use the version 2.6.0 but had the same issue in the official version.
Thanks for letting me know. This is an issue in the topic tree.
When publishing the topic: /test
the topic test
is published.
According to the HiveMQ best practices you should not use a leading /
as it is an empty topic. However, it should be supported and I will fix it 😉
@harmi86 I've uploaded a new Version (2.6.0 b129) to TestFlight. Do you like to test this?
I tested it and it is working now. Thanks a lot
maybe I should read the best practice 😂
Thanks for testing 👍
In my opinion, the leading slash meaning in MQTT is confusion.
I guess the intention when using it is almost every time to have the topic at the root like you would have it in a file system.