-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incomplete decoding of topic names #30
Comments
update: Otherwise you will get wrong matches. Just an other example: /blabla/sensor/window_open -> guess which one will be found if calling the function with /blabla/sensor/wind ! |
see pull request #36 |
Fixed with this commit |
Released in version 0.9.3 |
I have a device with a MQTT broker and a local client (just as in the example code). On the device side I publish two topics with similar names, where the name of the second is included in the name of the first, as this:
a) sensor/temperature (a floating point value, encoded as string, e.g. "19.8")
b) sensor/temperature_raw (a raw decimal value, e.g. 19384)
When I query the value of "temperature_raw" from a remote machine (e.g. by using mosquitto_sub) it seems that the broker does not properly evaluate the topic name, as it returns the value of "temperature" instead.
This bug is 100% reproducible and can be easily worked around by renaming the topic, in my case it started to work as expected after I renamed the topic to "sensor/raw_temperature".
However, this may be problematic when using nested topics, for example "/actor/xxx" for a read-only value and "/actor/xxx/set" for writing.
The text was updated successfully, but these errors were encountered: