4.7.3 A leading or trailing ‘/’ creates a distinct Topic Name or Topic Filter clarification

29 views
Skip to first unread message

Andrey Voronkov

unread,
Oct 31, 2022, 6:57:09 AM10/31/22
to MQTT
Hi folks!
What does "A leading or trailing ‘/’ creates a distinct Topic Name or Topic Filter" in MQTT 3.1.1 chapter 4.7.3 actually mean? I thougth that slash creates distinct level but not entire new Topic Filter or Topic Name.

P.S. Just covering my matching function with unit tests according to specification (it's kinda hell)

Karl Palsson

unread,
Oct 31, 2022, 7:33:21 AM10/31/22
to mq...@googlegroups.com

It means that

/hoho/lol/magic/ splits to 5 elements, "", "hoho", "lol", "magic"
and a final "" vs hoho/lol/magic splits to 3 elements, "hoho",
"lol" and "magic"

Sincerely,
Karl Palsson

OpenPGP-digital-signature.html

Andrey Voronkov

unread,
Oct 31, 2022, 7:48:12 AM10/31/22
to MQTT
Thank you Karl!
Reply all
Reply to author
Forward
0 new messages