Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Topic topic/subtopic does not match wildcard topic/subtopic/# #239

Closed
steersbob opened this issue Jul 31, 2023 · 2 comments · Fixed by #241
Closed

Topic topic/subtopic does not match wildcard topic/subtopic/# #239

steersbob opened this issue Jul 31, 2023 · 2 comments · Fixed by #241

Comments

@steersbob
Copy link
Contributor

For reference: https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt-v3.1.1-errata01-os-complete.html#_Toc442180920, section 4.7.1.2

Non normative comment

For example, if a Client subscribes to “sport/tennis/player1/#”, it would receive messages published using these topic names:
· “sport/tennis/player1”
· “sport/tennis/player1/ranking”
· “sport/tennis/player1/score/wimbledon”

Observed behavior for aiomqtt 1.0.0 is:

Python 3.9.9 (main, Aug 13 2022, 23:00:17) 
[GCC 11.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from aiomqtt import Topic
>>> Topic('sports/tennis/player1').matches('sports/tennis/player1/#')
False
>>> 
@empicano
Copy link
Owner

empicano commented Aug 1, 2023

Hi Bob,

Good catch! I actually didn't know this, but the documentation is clear on it.

Do you want to make a PR to fix it? 🙂

@steersbob
Copy link
Contributor Author

Yes, my intention is to send a PR once I'm done with the housekeeping involved in migrating our packages from the old aiomqtt.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants