ngx-mqtt icon indicating copy to clipboard operation
ngx-mqtt copied to clipboard

Topic match error: “sport/+” does not match “sport/”

Open milabi opened this issue 2 years ago • 3 comments

https://github.com/sclausen/ngx-mqtt/blob/f6f115b4a84fbbacfb1cf572df987531d57e5b90/projects/ngx-mqtt/src/lib/mqtt.service.ts#L156

Should the above code be changed to

return t !== undefined ? match() : false; 

[For example, “sport/tennis/+” matches “sport/tennis/player1” and “sport/tennis/player2”, but not “sport/tennis/player1/ranking”. Also, because the single-level wildcard matches only a single level, “sport/+” does not match “sport” but it does match “sport/”. jump to docs https://docs.oasis-open.org

milabi avatar Dec 15 '22 06:12 milabi